| 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 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 } | 976 } |
| 977 for (var value of iter) { | 977 for (var value of iter) { |
| 978 // Same as above. | 978 // Same as above. |
| 979 } | 979 } |
| 980 ``` | 980 ``` |
| 981 | 981 |
| 982 *** note | 982 *** note |
| 983 Currently the code generator doesn't take care of the name conflict. Namely, it
is not allowed to have "iterator" method in an iterable interface. | 983 Currently the code generator doesn't take care of the name conflict. Namely, it
is not allowed to have "iterator" method in an iterable interface. |
| 984 *** | 984 *** |
| 985 | 985 |
| 986 ### [Measure] _(m, a, c)_ | 986 ### [Measure] _(i, m, a, c)_ |
| 987 | 987 |
| 988 Summary: Measures usage of a specific feature via UseCounter. | 988 Summary: Measures usage of a specific feature via UseCounter. |
| 989 | 989 |
| 990 In order to measure usage of specific features, Chrome submits anonymous statist
ics through the Histogram recording system for users who opt-in to sharing usage
statistics. This extended attribute hooks up a specific feature to this measure
ment system. | 990 In order to measure usage of specific features, Chrome submits anonymous statist
ics through the Histogram recording system for users who opt-in to sharing usage
statistics. This extended attribute hooks up a specific feature to this measure
ment system. |
| 991 | 991 |
| 992 Usage: `[Measure]` can be specified on methods, attributes, and constants. The g
enerated feature name must be added to [UseCounter::Feature](https://code.google
.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/frame/Use
Counter.h&q=%22enum%20Feature%22&sq=package:chromium&type=cs&l=61) (in [core/fra
me/UseCounter.h](https://code.google.com/p/chromium/codesearch#chromium/src/thir
d_party/WebKit/Source/core/frame/UseCounter.h)). | 992 Usage: `[Measure]` can be specified on interfaces, methods, attributes, and cons
tants. When specified on an interface usage of the constructor will be measured.
The generated feature name must be added to [UseCounter::Feature](https://code.
google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/fra
me/UseCounter.h&q=%22enum%20Feature%22&sq=package:chromium&type=cs&l=61) (in [co
re/frame/UseCounter.h](https://code.google.com/p/chromium/codesearch#chromium/sr
c/third_party/WebKit/Source/core/frame/UseCounter.h)). |
| 993 | 993 |
| 994 ```webidl | 994 ```webidl |
| 995 [Measure] attribute Node interestingAttribute; | 995 [Measure] attribute Node interestingAttribute; |
| 996 [Measure] Node getInterestingNode(); | 996 [Measure] Node getInterestingNode(); |
| 997 [Measure] const INTERESTING_CONSTANT = 1; | 997 [Measure] const INTERESTING_CONSTANT = 1; |
| 998 ``` | 998 ``` |
| 999 | 999 |
| 1000 ### [MeasureAs] _(m, a, c)_ | 1000 ### [MeasureAs] _(i, m, a, c)_ |
| 1001 | 1001 |
| 1002 Summary: Like `[Measure]`, but the feature name is provided as the extended attr
ibute value. | 1002 Summary: Like `[Measure]`, but the feature name is provided as the extended attr
ibute value. |
| 1003 This is similar to the standard `[DeprecateAs]` extended attribute, but does not
display a deprecation warning. | 1003 This is similar to the standard `[DeprecateAs]` extended attribute, but does not
display a deprecation warning. |
| 1004 | 1004 |
| 1005 Usage: `[MeasureAs]` can be specified on methods, attributes, and constants. The
value must match one of the enumeration values in [UseCounter::Feature](https:/
/code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/co
re/frame/UseCounter.h&q=%22enum%20Feature%22&sq=package:chromium&type=cs&l=61) (
in [core/frame/UseCounter.h](https://code.google.com/p/chromium/codesearch#chrom
ium/src/third_party/WebKit/Source/core/frame/UseCounter.h)). | 1005 Usage: `[MeasureAs]` can be specified on interfaces, methods, attributes, and co
nstants. The value must match one of the enumeration values in [UseCounter::Feat
ure](https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebK
it/Source/core/frame/UseCounter.h&q=%22enum%20Feature%22&sq=package:chromium&typ
e=cs&l=61) (in [core/frame/UseCounter.h](https://code.google.com/p/chromium/code
search#chromium/src/third_party/WebKit/Source/core/frame/UseCounter.h)). |
| 1006 | 1006 |
| 1007 ```webidl | 1007 ```webidl |
| 1008 [MeasureAs=AttributeWeAreInterestedIn] attribute Node interestingAttribute; | 1008 [MeasureAs=AttributeWeAreInterestedIn] attribute Node interestingAttribute; |
| 1009 [MeasureAs=MethodsAreInterestingToo] Node getInterestingNode(); | 1009 [MeasureAs=MethodsAreInterestingToo] Node getInterestingNode(); |
| 1010 [MeasureAs=EvenSomeConstantsAreInteresting] const INTERESTING_CONSTANT = 1; | 1010 [MeasureAs=EvenSomeConstantsAreInteresting] const INTERESTING_CONSTANT = 1; |
| 1011 ``` | 1011 ``` |
| 1012 | 1012 |
| 1013 ### [NotEnumerable] _(m, a, s)_ | 1013 ### [NotEnumerable] _(m, a, s)_ |
| 1014 | 1014 |
| 1015 *** note | 1015 *** note |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 Copyright (C) 2009 Apple Inc. All rights reserved. | 1576 Copyright (C) 2009 Apple Inc. All rights reserved. |
| 1577 | 1577 |
| 1578 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: | 1578 Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: |
| 1579 | 1579 |
| 1580 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. | 1580 1. Redistributions of source code must retain the above copyright notice, this l
ist of conditions and the following disclaimer. |
| 1581 | 1581 |
| 1582 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. | 1582 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. |
| 1583 | 1583 |
| 1584 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. | 1584 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. |
| 1585 *** | 1585 *** |
| OLD | NEW |