WorkerGlobalScope: languagechange event

The languagechange event is fired at the global scope object when the user's preferred language changes.

Bubbles No
Cancelable No
Interface Event
Event handler onlanguagechange

Examples

You can use the languagechange event in an addEventListener method:

worker.addEventListener('languagechange', function() {
  console.log('languagechange event detected!');
});

Or use the onlanguagechange event handler property:

worker.onlanguagechange = function(event) {
  console.log('languagechange event detected!');
};

Specifications

Specification
HTML Standard (HTML)
# event-languagechange

Browser compatibility

BCD tables only load in the browser

See also