sugorokuLanguageOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The language an element or its page is in: its own lang, or the nearest above, and English unless that begins with ja.
インポート
import { sugorokuLanguageOf } from "@johnmorrisdotca/sugoroku/play";
定義
function sugorokuLanguageOf(element: Element | null): SugorokuLanguage
引数
| 名前 | 型 | 説明 |
|---|---|---|
element | Element | null | The host element whose inherited language is read; null selects the fallback. |
戻り値
SugorokuLanguage
The language an element or its page is in: its own lang, or the nearest above, and English unless that begins with ja.
例
import { sugorokuLanguageOf } from "@johnmorrisdotca/sugoroku/play";
const host = document.createElement("div");
host.lang="ja";
console.log(sugorokuLanguageOf(host));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。