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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 These extended attributes must either take no arguments or take an identifier li
st. | 297 These extended attributes must either take no arguments or take an identifier li
st. |
298 | 298 |
299 If the `[Global]` or `[PrimaryGlobal]` extended attribute is declared with an id
entifier list argument, then those identifiers are the interface’s global names;
otherwise, the interface has a single global name, which is the interface's ide
ntifier. | 299 If the `[Global]` or `[PrimaryGlobal]` extended attribute is declared with an id
entifier list argument, then those identifiers are the interface’s global names;
otherwise, the interface has a single global name, which is the interface's ide
ntifier. |
300 | 300 |
301 ### [HTMLConstructor] | 301 ### [HTMLConstructor] |
302 | 302 |
303 Standard: [HTMLConstructor](https://html.spec.whatwg.org/multipage/dom.html#html
-element-constructors) | 303 Standard: [HTMLConstructor](https://html.spec.whatwg.org/multipage/dom.html#html
-element-constructors) |
304 | 304 |
305 Summary: HTML Elements have special constructor behavior. Interface object of gi
ven interface with the `[HTMLConstructor]` attribute will have specific behavior
when called. | 305 Summary: HTML Elements have special constructor behavior. Interface object of gi
ven interface with the `[HTMLConstructor]` attribute will have specific behavior
when called. |
306 | 306 |
307 Usage: Must take no arguments, and must not appear on anything other than an int
erface. It much appear once on an interface, and the interface cannot be annotat
ed with `[Constructor]` or `[NoInterfaceObject]` extended attributes. It must no
t be used on a callback interface. | 307 Usage: Must take no arguments, and must not appear on anything other than an int
erface. It must appear once on an interface, and the interface cannot be annotat
ed with `[Constructor]` or `[NoInterfaceObject]` extended attributes. It must no
t be used on a callback interface. |
308 | 308 |
309 ### [NamedConstructor] _(i)_ | 309 ### [NamedConstructor] _(i)_ |
310 | 310 |
311 Standard: [NamedConstructor](https://heycam.github.io/webidl/#NamedConstructor) | 311 Standard: [NamedConstructor](https://heycam.github.io/webidl/#NamedConstructor) |
312 | 312 |
313 Summary: If you want to allow JavaScript to create a DOM object of XXX using a d
ifferent name constructor (i.e. allow JavaScript to create an XXX object using "
new YYY()", where YYY != XXX), you can use `[NamedConstructor]`. | 313 Summary: If you want to allow JavaScript to create a DOM object of XXX using a d
ifferent name constructor (i.e. allow JavaScript to create an XXX object using "
new YYY()", where YYY != XXX), you can use `[NamedConstructor]`. |
314 | 314 |
315 Usage: The possible usage is `[NamedConstructor=YYY(...)]`. Just as with constru
ctors, an empty argument list can be omitted, as: `[NamedConstructor=YYY]`. `[Na
medConstructor]` can be specified on interfaces. The spec allows multiple named
constructors, but the Blink IDL compiler currently only supports at most one. | 315 Usage: The possible usage is `[NamedConstructor=YYY(...)]`. Just as with constru
ctors, an empty argument list can be omitted, as: `[NamedConstructor=YYY]`. `[Na
medConstructor]` can be specified on interfaces. The spec allows multiple named
constructors, but the Blink IDL compiler currently only supports at most one. |
316 | 316 |
317 ```webidl | 317 ```webidl |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 Copyright (C) 2009 Apple Inc. All rights reserved. | 1605 Copyright (C) 2009 Apple Inc. All rights reserved. |
1606 | 1606 |
1607 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: | 1607 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: |
1608 | 1608 |
1609 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. | 1609 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. |
1610 | 1610 |
1611 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. | 1611 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. |
1612 | 1612 |
1613 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. | 1613 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. |
1614 *** | 1614 *** |
OLD | NEW |