WindowEventHandlers
ミックスインの onlanguagechange
プロパティは、languagechange
イベントを処理するための EventHandler
です。
このイベントは、このインターフェイスを実装するオブジェクト(通常は Window
、HTMLBodyElement
、HTMLIFrameElement
)によって受信されます。 このイベントは、優先言語リストが更新されたことを知らせるためにブラウザーによって送信されます。 このリストは、NavigatorLanguage.languages
を介してアクセスできます。
構文
object.onlanguagechange = function;
値
function
は、()
接尾辞やパラメーターを持たないユーザー定義関数の名前、またはfunction(event) {...}
などの匿名関数宣言です。 イベントハンドラには常に、Event
型のイベントを含む1つのパラメーターがあります。
例
window.onlanguagechange = function(event) {
console.log('languagechange イベントを検出!');
};
仕様
仕様 | 状態 | コメント |
---|---|---|
HTML Living Standard WindowEventHandler.onlanguagechange の定義 |
現行の標準 | 初期仕様 |
ブラウザーの互換性
BCD tables only load in the browser
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.
関連情報
languagechange
イベントとその型のEvent