OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 [ | 21 [ |
22 SpecialWrapFor=HTMLElement|SVGElement | 22 SpecialWrapFor=HTMLElement|SVGElement |
23 ] interface Element : Node { | 23 ] interface Element : Node { |
24 | 24 |
25 // DOM Level 1 Core | 25 // DOM Level 1 Core |
26 | 26 |
27 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing tagName; | 27 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing tagName; |
28 | 28 |
29 [TreatReturnedNullStringAs=Null] DOMString getAttribute([Default=Undefined]
optional DOMString name); | 29 [TreatReturnedNullStringAs=Null] DOMString getAttribute([Default=Undefined]
optional DOMString name); |
30 [RaisesException, CustomElementCallbacks] void setAttribute([Default=Undefin
ed] optional DOMString name, | 30 [RaisesException, CustomElementCallbacks] void setAttribute([Default=Undefin
ed] optional DOMString name, [Default=Undefined] optional DOMString value); |
31 [Default=Undefined] optional DOMString valu
e); | |
32 [CustomElementCallbacks] void removeAttribute([Default=Undefined] optional D
OMString name); | 31 [CustomElementCallbacks] void removeAttribute([Default=Undefined] optional D
OMString name); |
33 [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined
] optional DOMString name); // Removed from DOM4. | 32 [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined
] optional DOMString name); // Removed from DOM4. |
34 [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode]
Attr setAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr new
Attr); // Removed from DOM4. | 33 [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode]
Attr setAttributeNode([Default=Undefined, StrictTypeChecking] optional Attr new
Attr); // Removed from DOM4. |
35 [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNo
de] Attr removeAttributeNode([Default=Undefined, StrictTypeChecking] optional At
tr oldAttr); // Removed from DOM4. | 34 [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNo
de] Attr removeAttributeNode([Default=Undefined, StrictTypeChecking] optional At
tr oldAttr); // Removed from DOM4. |
36 [PerWorldBindings] NodeList getElementsByTagName([Default=Undefined] optiona
l DOMString name); | 35 [PerWorldBindings] NodeList getElementsByTagName([Default=Undefined] optiona
l DOMString name); |
37 | 36 |
38 [PerWorldBindings] readonly attribute NamedNodeMap attributes; | 37 [PerWorldBindings] readonly attribute NamedNodeMap attributes; |
39 [MeasureAs=HasAttributes] boolean hasAttributes(); | 38 [MeasureAs=HasAttributes] boolean hasAttributes(); |
40 | 39 |
41 // DOM Level 2 Core | 40 // DOM Level 2 Core |
42 | 41 |
43 DOMString getAttributeNS([TreatNullAs=NullString,Default=Undefined] optiona
l DOMString namespaceURI, | 42 DOMString getAttributeNS([TreatNullAs=NullString,Default=Undefined] optional
DOMString namespaceURI, |
44 [Default=Undefined] optional DOMStri
ng localName); | 43 [Default=Undefined] optional DOMString localName); |
45 [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=
NullString,Default=Undefined] optional DOMString namespaceURI, | 44 [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=N
ullString,Default=Undefined] optional DOMString namespaceURI, |
46 [Default=Undefined] optional DOMString qu
alifiedName, | 45 [Default=Undef
ined] optional DOMString qualifiedName, |
47 [Default=Undefined] optional DOMString va
lue); | 46 [Default=Undef
ined] optional DOMString value); |
48 [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DO
MString namespaceURI, | 47 [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DOM
String namespaceURI, DOMString localName); |
49 DOMString localName); | 48 NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] o
ptional DOMString namespaceURI, |
50 NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined]
optional DOMString namespaceURI, | 49 [Default=Undefined] optional DOMString local
Name); |
51 [Default=Undefined] optional
DOMString localName); | 50 [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=N
ullString,Default=Undefined] optional DOMString namespaceURI, |
52 [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=
NullString,Default=Undefined] optional DOMString namespaceURI, | 51 [Default=Undef
ined] optional DOMString localName); // Removed from DOM4. |
53 [Default=Unde
fined] optional DOMString localName); // Removed from DOM4. | |
54 [RaisesException, CustomElementCallbacks] Attr setAttributeNodeNS([Default=U
ndefined, StrictTypeChecking] optional Attr newAttr); | 52 [RaisesException, CustomElementCallbacks] Attr setAttributeNodeNS([Default=U
ndefined, StrictTypeChecking] optional Attr newAttr); |
55 boolean hasAttribute(DOMString name); | 53 boolean hasAttribute(DOMString name); |
56 boolean hasAttributeNS([TreatNullAs=NullString,Default=Undefined] optional
DOMString namespaceURI, | 54 boolean hasAttributeNS([TreatNullAs=NullString,Default=Undefined] optional D
OMString namespaceURI, |
57 [Default=Undefined] optional DOMString
localName); | 55 [Default=Undefined] optional DOMString localName); |
58 | 56 |
59 [PerWorldBindings] readonly attribute CSSStyleDeclaration style; | 57 [PerWorldBindings] readonly attribute CSSStyleDeclaration style; |
60 | 58 |
61 // DOM4 | 59 // DOM4 |
62 // iht.com relies on id returning the empty string when no id is present. | 60 // iht.com relies on id returning the empty string when no id is present. |
63 // Other browsers do this as well. So we don't convert null to JS null. | 61 // Other browsers do this as well. So we don't convert null to JS null. |
64 [Reflect, TreatNullAs=NullString] attribute DOMString id; | 62 [Reflect, TreatNullAs=NullString] attribute DOMString id; |
65 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing namespaceURI; | 63 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing namespaceURI; |
66 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, S
etterRaisesException] attribute DOMString prefix; | 64 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, S
etterRaisesException] attribute DOMString prefix; |
67 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing localName; | 65 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing localName; |
68 | 66 |
69 // Common extensions | 67 // Common extensions |
70 | 68 |
71 [PerWorldBindings] readonly attribute long offsetLeft; | 69 [PerWorldBindings] readonly attribute long offsetLeft; |
72 [PerWorldBindings] readonly attribute long offsetTop; | 70 [PerWorldBindings] readonly attribute long offsetTop; |
73 [PerWorldBindings] readonly attribute long offsetWidth; | 71 [PerWorldBindings] readonly attribute long offsetWidth; |
74 [PerWorldBindings] readonly attribute long offsetHeight; | 72 [PerWorldBindings] readonly attribute long offsetHeight; |
75 [ImplementedAs=bindingsOffsetParent, PerWorldBindings] readonly attribute El
ement offsetParent; | 73 [ImplementedAs=bindingsOffsetParent, PerWorldBindings] readonly attribute El
ement offsetParent; |
76 [PerWorldBindings] readonly attribute long clientLeft; | 74 [PerWorldBindings] readonly attribute long clientLeft; |
77 [PerWorldBindings] readonly attribute long clientTop; | 75 [PerWorldBindings] readonly attribute long clientTop; |
78 [PerWorldBindings] readonly attribute long clientWidth; | 76 [PerWorldBindings] readonly attribute long clientWidth; |
79 [PerWorldBindings] readonly attribute long clientHeight; | 77 [PerWorldBindings] readonly attribute long clientHeight; |
80 [PerWorldBindings] attribute long scrollLeft; | 78 [PerWorldBindings] attribute long scrollLeft; |
81 [PerWorldBindings] attribute long scrollTop; | 79 [PerWorldBindings] attribute long scrollTop; |
82 [PerWorldBindings] readonly attribute long scrollWidth; | 80 [PerWorldBindings] readonly attribute long scrollWidth; |
83 [PerWorldBindings] readonly attribute long scrollHeight; | 81 [PerWorldBindings] readonly attribute long scrollHeight; |
84 | 82 |
85 void focus(); | 83 void focus(); |
86 void blur(); | 84 void blur(); |
87 void scrollIntoView(optional boolean alignWithTop); | 85 void scrollIntoView(optional boolean alignWithTop); |
88 | 86 |
89 // WebKit extensions | 87 // WebKit extensions |
90 | 88 |
91 void scrollIntoViewIfNeeded(optional boolean centerIfNeeded); | 89 void scrollIntoViewIfNeeded(optional boolean centerIfNeeded); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 [RuntimeEnabled=Touch] attribute EventHandler ontouchend; | 146 [RuntimeEnabled=Touch] attribute EventHandler ontouchend; |
149 [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; | 147 [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; |
150 [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; | 148 [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; |
151 attribute EventHandler onwebkitfullscreenchange; | 149 attribute EventHandler onwebkitfullscreenchange; |
152 attribute EventHandler onwebkitfullscreenerror; | 150 attribute EventHandler onwebkitfullscreenerror; |
153 [ActivityLogging=SetterForAllWorlds] attribute EventHandler onwheel; | 151 [ActivityLogging=SetterForAllWorlds] attribute EventHandler onwheel; |
154 }; | 152 }; |
155 | 153 |
156 Element implements ParentNode; | 154 Element implements ParentNode; |
157 Element implements ChildNode; | 155 Element implements ChildNode; |
OLD | NEW |