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

Specification
HTML Standard (HTML)
# handler-workerglobalscope-onlanguagechange

Browser compatibility

BCD tables only load in the browser

See also

The WorkerGlobalScope interface it belongs to.