Summary
The onlanguagechange
property of the WorkerGlobalScope
interface represents an EventHandler
to be called when the languagechange
event occurs and bubbles through the Worker
.
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
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'WorkerGlobalScope.onlanguagechange' in that specification. |
Living Standard |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 4 | ? | 3.5 | Yes | 11.5 | 4 |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|---|---|
Basic support | ? | 40 | ? | 4 | Yes | 5.1 | 4.0 |
See also
The WorkerGlobalScope
interface it belongs to.