WorkerGlobalScope.onlanguagechange
The onlanguagechange
property of the WorkerGlobalScope
interface represents an event handler to be called when the languagechange
event occurs.
Syntax
self.onlanguagechange = function() { ... };
Example
The following code snippet shows an onlanguagechange
handler set inside a worker:
self.onlanguagechange = function() { console.log('Your preferred language settings have been changed'); }
Specifications
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
onlanguagechange |
4 |
12 |
74 |
Yes |
11.5 |
4 |
37 |
40 |
No |
Yes |
5 |
4.0 |
See also
The WorkerGlobalScope
interface it belongs to.
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/onlanguagechange