| OLD | NEW |
| 1 # Blink IDL Extended Attributes | 1 # Blink IDL Extended Attributes |
| 2 | 2 |
| 3 [TOC] | 3 [TOC] |
| 4 | 4 |
| 5 ## Introduction | 5 ## Introduction |
| 6 | 6 |
| 7 The main interest in extended attributes are their _semantics_: Blink implements
many more extended attributes than the Web IDL standard, to specify various beh
avior. | 7 The main interest in extended attributes are their _semantics_: Blink implements
many more extended attributes than the Web IDL standard, to specify various beh
avior. |
| 8 | 8 |
| 9 The authoritative list of allowed extended attributes and values is [bindings/ID
LExtendedAttributes.txt](https://code.google.com/p/chromium/codesearch#chromium/
src/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt). This is compl
ete but not necessarily precise (there may be unused extended attributes or valu
es), since validation is run on build, but coverage isn't checked. | 9 The authoritative list of allowed extended attributes and values is [bindings/ID
LExtendedAttributes.txt](https://code.google.com/p/chromium/codesearch#chromium/
src/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt). This is compl
ete but not necessarily precise (there may be unused extended attributes or valu
es), since validation is run on build, but coverage isn't checked. |
| 10 | 10 |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 ``` | 1418 ``` |
| 1419 | 1419 |
| 1420 ### [FlexibleArrayBufferView] | 1420 ### [FlexibleArrayBufferView] |
| 1421 | 1421 |
| 1422 Summary: `[FlexibleArrayBufferView]` wraps a parameter that is known to be an Ar
rayBufferView (or a subtype of, e.g. typed arrays) with a FlexibleArrayBufferVie
w. | 1422 Summary: `[FlexibleArrayBufferView]` wraps a parameter that is known to be an Ar
rayBufferView (or a subtype of, e.g. typed arrays) with a FlexibleArrayBufferVie
w. |
| 1423 | 1423 |
| 1424 The FlexibleArrayBufferView itself can then either refer to an actual ArrayBuffe
rView or a temporary copy (for small payloads) that may even live on the stack.
The idea is that copying the payload on the stack and referring to the temporary
copy saves creating global handles (resulting in weak roots) in V8. Note that `
[FlexibleArrayBufferView]` will actually result in a TypedFlexibleArrayBufferVi
ew wrapper for typed arrays. | 1424 The FlexibleArrayBufferView itself can then either refer to an actual ArrayBuffe
rView or a temporary copy (for small payloads) that may even live on the stack.
The idea is that copying the payload on the stack and referring to the temporary
copy saves creating global handles (resulting in weak roots) in V8. Note that `
[FlexibleArrayBufferView]` will actually result in a TypedFlexibleArrayBufferVi
ew wrapper for typed arrays. |
| 1425 | 1425 |
| 1426 Usage: Applies to arguments of methods. See modules/webgl/WebGLRenderingContextB
ase.idl for an example. | 1426 Usage: Applies to arguments of methods. See modules/webgl/WebGLRenderingContextB
ase.idl for an example. |
| 1427 | 1427 |
| 1428 ### [AllowShared] _(p)_ |
| 1429 |
| 1430 Summary: `[AllowShared]` indicates that a parameter, which must be an ArrayBuffe
rView (or subtype of, e.g. typed arrays), is allowed to be backed by a SharedArr
ayBuffer. |
| 1431 |
| 1432 Usage: `[AllowShared]` must be specified on a parameter to a method: |
| 1433 |
| 1434 ```webidl |
| 1435 interface Context { |
| 1436 void bufferData1([AllowShared] ArrayBufferView buffer); |
| 1437 void bufferData2([AllowShared] Float32Array buffer); |
| 1438 } |
| 1439 ``` |
| 1440 |
| 1441 A SharedArrayBuffer is a distinct type from an ArrayBuffer, but both types use A
rrayBufferViews to view the data in the buffer. Most methods do not permit an Ar
rayBufferView that is backed by a SharedArrayBuffer, and will throw an exception
. This attribute indicates that this method permits a shared ArrayBufferView. |
| 1442 |
| 1428 ### [PermissiveDictionaryConversion] _(p, d)_ | 1443 ### [PermissiveDictionaryConversion] _(p, d)_ |
| 1429 | 1444 |
| 1430 Summary: `[PermissiveDictionaryConversion]` relaxes the rules about what types o
f values may be passed for an argument of dictionary type. | 1445 Summary: `[PermissiveDictionaryConversion]` relaxes the rules about what types o
f values may be passed for an argument of dictionary type. |
| 1431 | 1446 |
| 1432 Ordinarily when passing in a value for a dictionary argument, the value must be
either undefined, null, or an object. In other words, passing a boolean value li
ke true or false must raise TypeError. The PermissiveDictionaryConversion extend
ed attribute ignores non-object types, treating them the same as undefined and n
ull. In order to effect this change, this extended attribute must be specified b
oth on the dictionary type as well as the arguments of methods where it is passe
d. It exists only to eliminate certain custom bindings. | 1447 Ordinarily when passing in a value for a dictionary argument, the value must be
either undefined, null, or an object. In other words, passing a boolean value li
ke true or false must raise TypeError. The PermissiveDictionaryConversion extend
ed attribute ignores non-object types, treating them the same as undefined and n
ull. In order to effect this change, this extended attribute must be specified b
oth on the dictionary type as well as the arguments of methods where it is passe
d. It exists only to eliminate certain custom bindings. |
| 1433 | 1448 |
| 1434 Usage: applies to dictionaries and arguments of methods. Takes no arguments itse
lf. | 1449 Usage: applies to dictionaries and arguments of methods. Takes no arguments itse
lf. |
| 1435 | 1450 |
| 1436 ### [URL] _(a)_ | 1451 ### [URL] _(a)_ |
| 1437 | 1452 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: | 1577 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: |
| 1563 | 1578 |
| 1564 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. | 1579 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. |
| 1565 | 1580 |
| 1566 2. Redistributions in binary form must reproduce the above copyright notice, thi
s list of conditions and the following disclaimer in the documentation and/or ot
her materials provided with the distribution. | 1581 2. Redistributions in binary form must reproduce the above copyright notice, thi
s list of conditions and the following disclaimer in the documentation and/or ot
her materials provided with the distribution. |
| 1567 | 1582 |
| 1568 THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXP
RESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIE
S OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, I
NCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMI
TED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFI
TS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHE
THER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI
BILITY OF SUCH DAMAGE. | 1583 THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXP
RESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIE
S OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, I
NCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMI
TED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFI
TS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHE
THER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI
BILITY OF SUCH DAMAGE. |
| 1569 *** | 1584 *** |
| 1570 | 1585 |
| 1571 [CrossOriginProperties]: https://html.spec.whatwg.org/multipage/browsers.html#cr
ossoriginproperties-(-o-) | 1586 [CrossOriginProperties]: https://html.spec.whatwg.org/multipage/browsers.html#cr
ossoriginproperties-(-o-) |
| OLD | NEW |