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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 ### [PostMessage] _(m)_ | 1069 ### [PostMessage] _(m)_ |
1070 | 1070 |
1071 Summary: Tells the code generator to generate postMessage method used in Workers
, Service Workers etc. | 1071 Summary: Tells the code generator to generate postMessage method used in Workers
, Service Workers etc. |
1072 | 1072 |
1073 Usage: `[PostMessage]` can be specified on methods | 1073 Usage: `[PostMessage]` can be specified on methods |
1074 | 1074 |
1075 ```webidl | 1075 ```webidl |
1076 [PostMessage] void postMessage(any message, optional sequence<Transferable> tran
sfer); | 1076 [PostMessage] void postMessage(any message, optional sequence<Transferable> tran
sfer); |
1077 ``` | 1077 ``` |
1078 | 1078 |
| 1079 ### [PrefixGet] _(d)_ |
| 1080 |
| 1081 Summary: If this extended attribute is specified on a dictionary member, the cod
e generator adds 'get' prefix to the getter method of the member. |
| 1082 |
1079 ### [RaisesException] _(i, m, a)_ | 1083 ### [RaisesException] _(i, m, a)_ |
1080 | 1084 |
1081 Summary: Tells the code generator to append an `ExceptionState&` argument when c
alling the Blink implementation. | 1085 Summary: Tells the code generator to append an `ExceptionState&` argument when c
alling the Blink implementation. |
1082 | 1086 |
1083 Implementations may use the methods on this parameter (e.g. `ExceptionState::thr
owDOMException`) to throw exceptions. | 1087 Implementations may use the methods on this parameter (e.g. `ExceptionState::thr
owDOMException`) to throw exceptions. |
1084 | 1088 |
1085 Usage: `[RaisesException]` can be specified on methods and attributes, `[RaisesE
xception=Getter]` and `[RaisesException=Setter]` can be specified on attributes,
and `[RaisesException=Constructor]` can be specified on interfaces where `[Cons
tructor]` is also specified. On methods and attributes, the IDL looks like: | 1089 Usage: `[RaisesException]` can be specified on methods and attributes, `[RaisesE
xception=Getter]` and `[RaisesException=Setter]` can be specified on attributes,
and `[RaisesException=Constructor]` can be specified on interfaces where `[Cons
tructor]` is also specified. On methods and attributes, the IDL looks like: |
1086 | 1090 |
1087 ```webidl | 1091 ```webidl |
1088 interface XXX { | 1092 interface XXX { |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: | 1658 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: |
1655 | 1659 |
1656 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. | 1660 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. |
1657 | 1661 |
1658 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. | 1662 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. |
1659 | 1663 |
1660 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. | 1664 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. |
1661 *** | 1665 *** |
1662 | 1666 |
1663 [CrossOriginProperties]: https://html.spec.whatwg.org/multipage/browsers.html#cr
ossoriginproperties-(-o-) | 1667 [CrossOriginProperties]: https://html.spec.whatwg.org/multipage/browsers.html#cr
ossoriginproperties-(-o-) |
OLD | NEW |