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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 ```webidl | 1036 ```webidl |
1037 [ | 1037 [ |
1038 OriginTrialEnabled=MediaSession | 1038 OriginTrialEnabled=MediaSession |
1039 ] interface MediaSession { ... }; | 1039 ] interface MediaSession { ... }; |
1040 ``` | 1040 ``` |
1041 | 1041 |
1042 When there is an active origin trial for the current execution context, the feat
ure is enabled at runtime, and the binding would be exposed to the web. `[Origin
TrialEnabled]` also includes a check for the associated runtime flag, so feature
s can be enabled in that fashion, even without an origin trial. | 1042 When there is an active origin trial for the current execution context, the feat
ure is enabled at runtime, and the binding would be exposed to the web. `[Origin
TrialEnabled]` also includes a check for the associated runtime flag, so feature
s can be enabled in that fashion, even without an origin trial. |
1043 | 1043 |
1044 `[OriginTrialEnabled]` has similar semantics to `[RuntimeEnabled]`, and is inten
ded as a drop-in replacement. For example, `[OriginTrialEnabled]` _cannot_ be ap
plied to arguments, see `[RuntimeEnabled]` for reasoning. The key implementation
difference is that `[OriginTrialEnabled]` wraps the generated code with `if (Or
iginTrials::FeatureNameEnabled(...)) { ...code... }`. | 1044 `[OriginTrialEnabled]` has similar semantics to `[RuntimeEnabled]`, and is inten
ded as a drop-in replacement. For example, `[OriginTrialEnabled]` _cannot_ be ap
plied to arguments, see `[RuntimeEnabled]` for reasoning. The key implementation
difference is that `[OriginTrialEnabled]` wraps the generated code with `if (Or
iginTrials::FeatureNameEnabled(...)) { ...code... }`. |
1045 | 1045 |
1046 *** note | |
1047 **FIXME:** Currently, due to [Bug 586594](https://crbug.com/586594), the `[Origi
nTrialEnabled]` attribute must be used _in addition to_ `[RuntimeEnabled]`, inst
ead of being used as a replacement. | |
1048 *** | |
1049 | |
1050 For more information, see [RuntimeEnabledFeatures](https://code.google.com/p/chr
omium/codesearch#chromium/src/third_party/WebKit/Source/platform/RuntimeEnabledF
eatures.in) and [OriginTrialContext](https://code.google.com/p/chromium/codesear
ch#chromium/src/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.
h). | 1046 For more information, see [RuntimeEnabledFeatures](https://code.google.com/p/chr
omium/codesearch#chromium/src/third_party/WebKit/Source/platform/RuntimeEnabledF
eatures.in) and [OriginTrialContext](https://code.google.com/p/chromium/codesear
ch#chromium/src/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.
h). |
1051 | 1047 |
1052 ### [PostMessage] _(m)_ | 1048 ### [PostMessage] _(m)_ |
1053 | 1049 |
1054 Summary: Tells the code generator to generate postMessage method used in Workers
, Service Workers etc. | 1050 Summary: Tells the code generator to generate postMessage method used in Workers
, Service Workers etc. |
1055 | 1051 |
1056 Usage: `[PostMessage]` can be specified on methods | 1052 Usage: `[PostMessage]` can be specified on methods |
1057 | 1053 |
1058 ```webidl | 1054 ```webidl |
1059 [PostMessage] void postMessage(any message, optional sequence<Transferable> tran
sfer); | 1055 [PostMessage] void postMessage(any message, optional sequence<Transferable> tran
sfer); |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 Copyright (C) 2009 Apple Inc. All rights reserved. | 1570 Copyright (C) 2009 Apple Inc. All rights reserved. |
1575 | 1571 |
1576 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: | 1572 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: |
1577 | 1573 |
1578 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. | 1574 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. |
1579 | 1575 |
1580 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. | 1576 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 | 1577 |
1582 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. | 1578 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 *** | 1579 *** |
OLD | NEW |