|
6 | 6 |
|
7 | 7 | <style> |
8 | 8 |
|
9 | | -:root { |
10 | | - --code-color: light-dark( hsl(12 100% 33%), hsl(12 100% 73%) ); |
11 | | - --idl-color: light-dark( hsl(231 100% 23%), hsl(231 100% 83%) ); |
12 | | - --idl-bg-color: light-dark( hsl(204 80% 95%), hsl(204 80% 13%) ); |
13 | | -} |
14 | | - |
15 | | -code { |
16 | | - color: var(--code-color); |
17 | | -} |
18 | | - |
19 | 9 | /* 拡張d属性 */ |
20 | 10 | .xattr { |
21 | 11 | font-family: monospace0, monospace; |
22 | 12 | color: var(--text-color-1); |
23 | 13 | } |
24 | 14 |
|
25 | | -/* IDL, JavaScript 型/値 */ |
| 15 | +/* IDL */ |
26 | 16 |
|
27 | 17 | .idltype, |
28 | 18 | .idlmember, |
29 | 19 | .idlvalue { |
30 | | - font-family: monospace0, monospace; |
31 | | - color: var(--idl-color); |
32 | 20 | } |
33 | 21 |
|
34 | | -/* JavaScript */ |
| 22 | +/* JS */ |
35 | 23 | .js-property, |
36 | 24 | .js-error { |
37 | 25 | color: var(--js-color); |
|
42 | 30 | text-decoration: underline; |
43 | 31 | } |
44 | 32 |
|
45 | | - /* コードブロック */ |
46 | | -pre { |
47 | | - margin: 0.5em 0 0.5em 0.5em; |
48 | | - padding: 0.5em 1em; |
49 | | -} |
50 | | - |
51 | | -pre.webidl { |
52 | | - background: var(--idl-bg-color); |
53 | | -} |
54 | | - |
55 | 33 | /* 引用例 */ |
56 | 34 | blockquote { |
57 | 35 | border: dashed thin var(--N-color); |
@@ -4132,7 +4110,7 @@ <h5 title="Creating a sequence from an iterable">3.2.21.1. 可反復から連列 |
4132 | 4110 | The following interface defines an attribute of a sequence type as well as an operation with an argument of a sequence type. |
4133 | 4111 | </p> |
4134 | 4112 |
|
4135 | | -<pre class="webidl"> |
| 4113 | +<pre class="idl"> |
4136 | 4114 | [Exposed=Window] |
4137 | 4115 | interface Canvas { |
4138 | 4116 |
|
@@ -5829,7 +5807,7 @@ <h5 title="Examples">3.2.24.2. 例</h5> |
5829 | 5807 | delay is an operation that returns a promise that will be fulfilled in a number of milliseconds. It illustrates how simply you can resolve a promise, with one line of prose. |
5830 | 5808 | </p> |
5831 | 5809 |
|
5832 | | -<pre class="webidl"> |
| 5810 | +<pre class="idl"> |
5833 | 5811 | interface I { |
5834 | 5812 | Promise<undefined> delay(unrestricted double ms); |
5835 | 5813 | }; |
@@ -5914,7 +5892,7 @@ <h5 title="Examples">3.2.24.2. 例</h5> |
5914 | 5892 | The validatedDelay operation is much like the delay function, except it will validate its arguments. This shows how to use rejected promises to signal immediate failure before even starting any asynchronous operations. |
5915 | 5893 | </p> |
5916 | 5894 |
|
5917 | | -<pre class="webidl"> |
| 5895 | +<pre class="idl"> |
5918 | 5896 | interface I { |
5919 | 5897 | Promise<undefined> validatedDelay(unrestricted double ms); |
5920 | 5898 | }; |
@@ -6006,7 +5984,7 @@ <h5 title="Examples">3.2.24.2. 例</h5> |
6006 | 5984 | addDelay is an operation that adds an extra number of milliseconds of delay between promise settling and the returned promise settling. |
6007 | 5985 | </p> |
6008 | 5986 |
|
6009 | | -<pre class="webidl"> |
| 5987 | +<pre class="idl"> |
6010 | 5988 | interface I { |
6011 | 5989 | Promise<any> addDelay(Promise<any> promise, unrestricted double ms); |
6012 | 5990 | }; |
@@ -6148,7 +6126,7 @@ <h5 title="Examples">3.2.24.2. 例</h5> |
6148 | 6126 | environment.ready is an attribute that signals when some part of some environment, e.g. a DOM document, becomes "ready". It illustrates how to encode environmental asynchronicity. |
6149 | 6127 | </p> |
6150 | 6128 |
|
6151 | | -<pre class="webidl"> |
| 6129 | +<pre class="idl"> |
6152 | 6130 | interface Environment { |
6153 | 6131 | readonly attribute Promise<undefined> ready; |
6154 | 6132 | }; |
@@ -6270,7 +6248,7 @@ <h5 title="Examples">3.2.24.2. 例</h5> |
6270 | 6248 | addBookmark is an operation that requests that the user add the current web page as a bookmark. It’s drawn from some iterative design work and illustrates a more real-world scenario of appealing to environmental asynchrony, as well as immediate rejections. |
6271 | 6249 | </p> |
6272 | 6250 |
|
6273 | | -<pre class="webidl"> |
| 6251 | +<pre class="idl"> |
6274 | 6252 | interface I { |
6275 | 6253 | Promise<undefined> addBookmark(); |
6276 | 6254 | }; |
@@ -6394,7 +6372,7 @@ <h5 title="Examples">3.2.24.2. 例</h5> |
6394 | 6372 | Several places in [SERVICE-WORKERS] use get a promise to wait for all. batchRequest illustrates a simplified version of one of their uses. It takes as input a sequence of URLs, and returns a promise for a sequence of Response objects created by fetching the corresponding URL. If any of the fetches fail, it will return a promise rejected with that failure. |
6395 | 6373 | </p> |
6396 | 6374 |
|
6397 | | -<pre class="webidl"> |
| 6375 | +<pre class="idl"> |
6398 | 6376 | interface I { |
6399 | 6377 | Promise<sequence<Response>> batchRequest(sequence<USVString> urls); |
6400 | 6378 | }; |
@@ -8158,7 +8136,7 @@ <h4>3.3.2. `AllowShared^x</h4> |
8158 | 8136 | The following IDL fragment demonstrates the possible combinations of the [AllowResizable] and [AllowShared] extended attribute: |
8159 | 8137 | </p> |
8160 | 8138 |
|
8161 | | -<pre class="webidl"> |
| 8139 | +<pre class="idl"> |
8162 | 8140 | [Exposed=Window] |
8163 | 8141 | interface ExampleBufferFeature { |
8164 | 8142 | undefined writeInto(ArrayBufferView %dest); |
@@ -8275,7 +8253,7 @@ <h4>3.3.3. `Clamp^x</h4> |
8275 | 8253 | In the following IDL fragment, two operations are declared that take three octet arguments; one uses the [Clamp] extended attribute on all three arguments, while the other does not: |
8276 | 8254 | </p> |
8277 | 8255 |
|
8278 | | -<pre class="webidl"> |
| 8256 | +<pre class="idl"> |
8279 | 8257 | [Exposed=Window] |
8280 | 8258 | interface GraphicsContext { |
8281 | 8259 | undefined setColor(octet %red, octet %green, octet %blue); |
@@ -8548,7 +8526,7 @@ <h4>3.3.5. `Default^x</h4> |
8548 | 8526 | As an example, the [Default] extended attribute is suitable for use on toJSON regular operations: |
8549 | 8527 | </p> |
8550 | 8528 |
|
8551 | | -<pre class="webidl"> |
| 8529 | +<pre class="idl"> |
8552 | 8530 | [Exposed=Window] |
8553 | 8531 | interface Animal { |
8554 | 8532 | attribute DOMString name; |
@@ -8684,7 +8662,7 @@ <h4>3.3.6. `EnforceRange^x</h4> |
8684 | 8662 | In the following IDL fragment, two operations are declared that take three octet arguments; one uses the [EnforceRange] extended attribute on all three arguments, while the other does not: |
8685 | 8663 | </p> |
8686 | 8664 |
|
8687 | | -<pre class="webidl"> |
| 8665 | +<pre class="idl"> |
8688 | 8666 | [Exposed=Window] |
8689 | 8667 | interface GraphicsContext { |
8690 | 8668 | undefined setColor(octet %red, octet %green, octet %blue); |
@@ -9400,7 +9378,7 @@ <h4>3.3.7. `Exposed^x</h4> |
9400 | 9378 | The following IDL fragment shows how that might be achieved: |
9401 | 9379 | </p> |
9402 | 9380 |
|
9403 | | -<pre class="webidl"> |
| 9381 | +<pre class="idl"> |
9404 | 9382 | [Exposed=Window, Global=Window] |
9405 | 9383 | interface Window { |
9406 | 9384 | /* ... */ |
@@ -9748,7 +9726,7 @@ <h4>3.3.8. `Global^x</h4> |
9748 | 9726 | The Window interface exposes frames as properties on the Window object. Since the Window object also serves as the JavaScript global object, variable declarations or assignments to the named properties will result in them being replaced by the new value. Variable declarations for attributes will not create a property that replaces the existing one. |
9749 | 9727 | </p> |
9750 | 9728 |
|
9751 | | -<pre class="webidl"> |
| 9729 | +<pre class="idl"> |
9752 | 9730 | [Exposed=Window, Global=Window] |
9753 | 9731 | interface Window { |
9754 | 9732 | getter object【!any】 (DOMString %name); |
@@ -9886,7 +9864,7 @@ <h4>3.3.9. `NewObject^x</h4> |
9886 | 9864 | As an example, this extended attribute is suitable for use on the createElement() operation on the Document interface, since a new object is always returned when it is called. [DOM] |
9887 | 9865 | </p> |
9888 | 9866 |
|
9889 | | -<pre class="webidl"> |
| 9867 | +<pre class="idl"> |
9890 | 9868 | [Exposed=Window] |
9891 | 9869 | interface Document : Node { |
9892 | 9870 | [NewObject] Element createElement(DOMString %localName); |
@@ -10022,7 +10000,7 @@ <h4>3.3.10. `PutForwards^x</h4> |
10022 | 10000 | The following IDL fragment defines interfaces for names and people. The [PutForwards] extended attribute is used on the name attribute of the Person interface to indicate that assignments to that attribute result in assignments to the full attribute of the Person object: |
10023 | 10001 | </p> |
10024 | 10002 |
|
10025 | | -<pre class="webidl"> |
| 10003 | +<pre class="idl"> |
10026 | 10004 | [Exposed=Window] |
10027 | 10005 | interface Name { |
10028 | 10006 | attribute DOMString full; |
@@ -10135,7 +10113,7 @@ <h4>3.3.11. `Replaceable^x</h4> |
10135 | 10113 | The following IDL fragment defines an interface with an operation that increments a counter, and an attribute that exposes the counter’s value, which is initially 0: |
10136 | 10114 | </p> |
10137 | 10115 |
|
10138 | | -<pre class="webidl"> |
| 10116 | +<pre class="idl"> |
10139 | 10117 | [Exposed=Window] |
10140 | 10118 | interface Counter { |
10141 | 10119 | [Replaceable] readonly attribute unsigned long value; |
@@ -10251,7 +10229,7 @@ <h4>3.3.12. `SameObject^x</h4> |
10251 | 10229 | As an example, this extended attribute is suitable for use on the implementation attribute on the Document interface since the same object is always returned for a given Document object. [DOM] |
10252 | 10230 | </p> |
10253 | 10231 |
|
10254 | | -<pre class="webidl"> |
| 10232 | +<pre class="idl"> |
10255 | 10233 | [Exposed=Window] |
10256 | 10234 | interface Document : Node { |
10257 | 10235 | [SameObject] readonly attribute DOMImplementation implementation; |
@@ -10375,7 +10353,7 @@ <h4>3.3.13. `SecureContext^x</h4> |
10375 | 10353 | The following IDL fragment defines an interface with one operation that is executable from all contexts, and two which are executable only from secure contexts. |
10376 | 10354 | </p> |
10377 | 10355 |
|
10378 | | -<pre class="webidl"> |
| 10356 | +<pre class="idl"> |
10379 | 10357 | [Exposed=Window] |
10380 | 10358 | interface ExampleFeature { |
10381 | 10359 | /* <span class="comment"> |
@@ -10520,7 +10498,7 @@ <h4>3.3.14. `Unscopable^x</h4> |
10520 | 10498 | For example, with the following IDL: |
10521 | 10499 | </p> |
10522 | 10500 |
|
10523 | | -<pre class="webidl"> |
| 10501 | +<pre class="idl"> |
10524 | 10502 | [Exposed=Window] |
10525 | 10503 | interface Thing { |
10526 | 10504 | undefined f(); |
@@ -10678,7 +10656,7 @@ <h4>3.4.1. `LegacyFactoryFunction^x</h4> |
10678 | 10656 | The following IDL defines an interface that uses the [LegacyFactoryFunction] extended attribute. |
10679 | 10657 | </p> |
10680 | 10658 |
|
10681 | | -<pre class="webidl"> |
| 10659 | +<pre class="idl"> |
10682 | 10660 | [Exposed=Window, |
10683 | 10661 | LegacyFactoryFunction=Audio(DOMString %src)] |
10684 | 10662 | interface HTMLAudioElement : HTMLMediaElement { |
@@ -10797,7 +10775,7 @@ <h4>3.4.2. `LegacyLenientSetter^x</h4> |
10797 | 10775 | The following IDL fragment defines an interface that uses the [LegacyLenientSetter] extended attribute. |
10798 | 10776 | </p> |
10799 | 10777 |
|
10800 | | -<pre class="webidl"> |
| 10778 | +<pre class="idl"> |
10801 | 10779 | [Exposed=Window] |
10802 | 10780 | interface Example { |
10803 | 10781 | [LegacyLenientSetter] readonly attribute DOMString x; |
@@ -10890,7 +10868,7 @@ <h4>3.4.3. `LegacyLenientThis^x</h4> |
10890 | 10868 | The following IDL fragment defines an interface that uses the [LegacyLenientThis] extended attribute. |
10891 | 10869 | </p> |
10892 | 10870 |
|
10893 | | -<pre class="webidl"> |
| 10871 | +<pre class="idl"> |
10894 | 10872 | [Exposed=Window] |
10895 | 10873 | interface Example { |
10896 | 10874 | [LegacyLenientThis] attribute DOMString x; |
@@ -11007,7 +10985,7 @@ <h4>3.4.4. `LegacyNamespace^x</h4> |
11007 | 10985 | The following IDL fragment defines a namespace and an interface which uses [LegacyNamespace] to be defined inside of it. |
11008 | 10986 | </p> |
11009 | 10987 |
|
11010 | | -<pre class="webidl"> |
| 10988 | +<pre class="idl"> |
11011 | 10989 | [Exposed=Window]【!*原文抜け】 |
11012 | 10990 | namespace Foo { }; |
11013 | 10991 |
|
@@ -11083,7 +11061,7 @@ <h4>3.4.5. `LegacyNoInterfaceObject^x</h4> |
11083 | 11061 | The following IDL fragment defines two interfaces, one whose interface object is exposed on the JavaScript global object, and one whose isn’t: |
11084 | 11062 | </p> |
11085 | 11063 |
|
11086 | | -<pre class="webidl"> |
| 11064 | +<pre class="idl"> |
11087 | 11065 | [Exposed=Window] |
11088 | 11066 | interface Storage { |
11089 | 11067 | undefined addEntry(unsigned long %key, any %value); |
@@ -11185,7 +11163,7 @@ <h4>3.4.6. `LegacyNullToEmptyString^x</h4> |
11185 | 11163 | The following IDL fragment defines an interface that has one attribute whose type has the extended attribute, and one operation whose argument’s type has the extended attribute: |
11186 | 11164 | </p> |
11187 | 11165 |
|
11188 | | -<pre class="webidl"> |
| 11166 | +<pre class="idl"> |
11189 | 11167 | [Exposed=Window] |
11190 | 11168 | interface Dog { |
11191 | 11169 | attribute DOMString name; |
@@ -11319,7 +11297,7 @@ <h4>3.4.7. `LegacyOverrideBuiltIns^x</h4> |
11319 | 11297 | The following IDL fragment defines two interfaces, one that has a named property getter and one that does not. |
11320 | 11298 | </p> |
11321 | 11299 |
|
11322 | | -<pre class="webidl"> |
| 11300 | +<pre class="idl"> |
11323 | 11301 | [Exposed=Window] |
11324 | 11302 | interface StringMap { |
11325 | 11303 | readonly attribute unsigned long length; |
@@ -11447,7 +11425,7 @@ <h4>3.4.8. `LegacyTreatNonObjectAsNull^x</h4> |
11447 | 11425 | The following IDL fragment defines an interface that has one attribute whose type is a [LegacyTreatNonObjectAsNull]-annotated callback function and another whose type is a callback function without the extended attribute: |
11448 | 11426 | </p> |
11449 | 11427 |
|
11450 | | -<pre class="webidl"> |
| 11428 | +<pre class="idl"> |
11451 | 11429 | callback OccurrenceHandler = undefined (DOMString %details); |
11452 | 11430 |
|
11453 | 11431 | [LegacyTreatNonObjectAsNull] |
@@ -11655,7 +11633,7 @@ <h4>3.4.10. `LegacyUnforgeable^x</h4> |
11655 | 11633 | For example, the following is disallowed: |
11656 | 11634 | </p> |
11657 | 11635 |
|
11658 | | -<pre class="webidl"> |
| 11636 | +<pre class="idl"> |
11659 | 11637 | [Exposed=Window] |
11660 | 11638 | interface A1 { |
11661 | 11639 | [LegacyUnforgeable] readonly attribute DOMString x; |
@@ -11704,7 +11682,7 @@ <h4>3.4.10. `LegacyUnforgeable^x</h4> |
11704 | 11682 | The following IDL fragment defines an interface that has two attributes, one of which is designated as [LegacyUnforgeable]: |
11705 | 11683 | </p> |
11706 | 11684 |
|
11707 | | -<pre class="webidl"> |
| 11685 | +<pre class="idl"> |
11708 | 11686 | [Exposed=Window] |
11709 | 11687 | interface System { |
11710 | 11688 | [LegacyUnforgeable] readonly attribute DOMString username; |
@@ -11847,7 +11825,7 @@ <h4>3.4.11. `LegacyWindowAlias^x</h4> |
11847 | 11825 | The following IDL defines an interface that uses the [LegacyWindowAlias] extended attribute. |
11848 | 11826 | </p> |
11849 | 11827 |
|
11850 | | -<pre class="webidl"> |
| 11828 | +<pre class="idl"> |
11851 | 11829 | [Exposed=Window, |
11852 | 11830 | LegacyWindowAlias=WebKitCSSMatrix] |
11853 | 11831 | interface DOMMatrix : DOMMatrixReadOnly { |
@@ -13697,7 +13675,7 @@ <h4 title="Interface prototype object">3.7.3. ~ifc原型~obj</h4> |
13697 | 13675 | The interface prototype object of an interface that is defined with the [LegacyNoInterfaceObject] extended attribute will be accessible. For example, with the following IDL: |
13698 | 13676 | </p> |
13699 | 13677 |
|
13700 | | -<pre class="webidl"> |
| 13678 | +<pre class="idl"> |
13701 | 13679 | [Exposed=Window, |
13702 | 13680 | LegacyNoInterfaceObject] |
13703 | 13681 | interface Foo { |
@@ -15379,7 +15357,7 @@ <h6 title="Default toJSON operation">3.7.7.1.1. 既定の~toJSON演算</h6> |
15379 | 15357 | Only regular attributes of interfaces that declare a toJSON operation with a [Default] extended attribute are included, even if an inherited interface declares such a toJSON operation. For example, consider the following IDL fragment: |
15380 | 15358 | </p> |
15381 | 15359 |
|
15382 | | -<pre class="webidl"> |
| 15360 | +<pre class="idl"> |
15383 | 15361 | [Exposed=Window] |
15384 | 15362 | interface A { |
15385 | 15363 | [Default] object toJSON(); |
@@ -15438,7 +15416,7 @@ <h6 title="Default toJSON operation">3.7.7.1.1. 既定の~toJSON演算</h6> |
15438 | 15416 | A toJSON operation can also be declared on an interface mixin (or partial interface) and is equivalent to declaring it on the original interface. For example, consider the following IDL fragment: |
15439 | 15417 | </p> |
15440 | 15418 |
|
15441 | | -<pre class="webidl"> |
| 15419 | +<pre class="idl"> |
15442 | 15420 | [Exposed=Window] |
15443 | 15421 | interface D { |
15444 | 15422 | attribute DOMString d; |
@@ -22370,7 +22348,7 @@ <h4 title="Creating and throwing exceptions">3.14.3. 例外の作成-法と投 |
22370 | 22348 | The above algorithms restrict objects representing exceptions propagating out of a function object to be ones that are associated with the realm of that function object (i.e., the current realm at the time the function executes). For example, consider the IDL: |
22371 | 22349 | </p> |
22372 | 22350 |
|
22373 | | -<pre class="webidl"> |
| 22351 | +<pre class="idl"> |
22374 | 22352 | [Exposed=Window] |
22375 | 22353 | interface MathUtils { |
22376 | 22354 | /* <span class="comment"> |
@@ -22451,7 +22429,7 @@ <h4 title="Handling exceptions">3.14.4. 例外の取扱い</h4> |
22451 | 22429 | The following IDL fragment defines two interfaces and an exception. The valueOf attribute on ExceptionThrower is defined to throw an exception whenever an attempt is made to get its value. |
22452 | 22430 | </p> |
22453 | 22431 |
|
22454 | | -<pre class="webidl"> |
| 22432 | +<pre class="idl"> |
22455 | 22433 | [Exposed=Window] |
22456 | 22434 | interface Dahut { |
22457 | 22435 | attribute DOMString type; |
|
0 commit comments