| 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, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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(DOMString name); | 29 [TreatReturnedNullStringAs=Null] DOMString getAttribute(DOMString name); |
| 30 [RaisesException, CustomElementCallbacks] void setAttribute(DOMString name,
DOMString value); | 30 [RaisesException, CustomElementCallbacks] void setAttribute(DOMString name,
DOMString value); |
| 31 [CustomElementCallbacks] void removeAttribute(DOMString name); | 31 [CustomElementCallbacks] void removeAttribute(DOMString name); |
| 32 [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. |
| 33 [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. |
| 34 [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. |
| 35 [PerWorldBindings] NodeList getElementsByTagName(DOMString name); | 35 [PerWorldBindings] HTMLCollection getElementsByTagName(DOMString name); |
| 36 | 36 |
| 37 [PerWorldBindings] readonly attribute NamedNodeMap attributes; | 37 [PerWorldBindings] readonly attribute NamedNodeMap attributes; |
| 38 [MeasureAs=HasAttributes] boolean hasAttributes(); | 38 [MeasureAs=HasAttributes] boolean hasAttributes(); |
| 39 | 39 |
| 40 // DOM Level 2 Core | 40 // DOM Level 2 Core |
| 41 | 41 |
| 42 DOMString getAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DO
MString localName); | 42 DOMString getAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DO
MString localName); |
| 43 [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=N
ullString] DOMString namespaceURI, DOMString qualifiedName, DOMString value); | 43 [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=N
ullString] DOMString namespaceURI, DOMString qualifiedName, DOMString value); |
| 44 [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DOM
String namespaceURI, DOMString localName); | 44 [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DOM
String namespaceURI, DOMString localName); |
| 45 NodeList getElementsByTagNameNS([TreatNullAs=NullString] DOMString namespace
URI, DOMString localName); | 45 HTMLCollection getElementsByTagNameNS([TreatNullAs=NullString] DOMString nam
espaceURI, DOMString localName); |
| 46 [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=N
ullString,Default=Undefined] optional DOMString namespaceURI, | 46 [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=N
ullString,Default=Undefined] optional DOMString namespaceURI, |
| 47 [Default=Undef
ined] optional DOMString localName); // Removed from DOM4. | 47 [Default=Undef
ined] optional DOMString localName); // Removed from DOM4. |
| 48 [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNodeN
S] Attr setAttributeNodeNS([Default=Undefined, StrictTypeChecking] optional Attr
newAttr); // Removed from DOM4. | |
| 49 boolean hasAttribute(DOMString name); | 48 boolean hasAttribute(DOMString name); |
| 50 boolean hasAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DOMS
tring localName); | 49 boolean hasAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DOMS
tring localName); |
| 51 | 50 |
| 52 [PerWorldBindings] readonly attribute CSSStyleDeclaration style; | 51 [PerWorldBindings] readonly attribute CSSStyleDeclaration style; |
| 53 | 52 |
| 54 // DOM4 | 53 // DOM4 |
| 55 [Reflect] attribute DOMString id; | 54 [Reflect, PerWorldBindings] attribute DOMString id; |
| 56 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing namespaceURI; | 55 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing namespaceURI; |
| 57 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, R
aisesException=Setter] attribute DOMString prefix; | 56 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, R
aisesException=Setter] attribute DOMString prefix; |
| 58 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing localName; | 57 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr
ing localName; |
| 59 | 58 |
| 59 [RaisesException] boolean matches(DOMString selectors); |
| 60 |
| 60 // Common extensions | 61 // Common extensions |
| 61 | 62 |
| 62 [PerWorldBindings] readonly attribute long offsetLeft; | 63 [PerWorldBindings] readonly attribute long offsetLeft; |
| 63 [PerWorldBindings] readonly attribute long offsetTop; | 64 [PerWorldBindings] readonly attribute long offsetTop; |
| 64 [PerWorldBindings] readonly attribute long offsetWidth; | 65 [PerWorldBindings] readonly attribute long offsetWidth; |
| 65 [PerWorldBindings] readonly attribute long offsetHeight; | 66 [PerWorldBindings] readonly attribute long offsetHeight; |
| 66 [ImplementedAs=bindingsOffsetParent, PerWorldBindings] readonly attribute El
ement offsetParent; | 67 [ImplementedAs=offsetParentForBindings, PerWorldBindings] readonly attribute
Element offsetParent; |
| 67 [PerWorldBindings] readonly attribute long clientLeft; | 68 [PerWorldBindings] readonly attribute long clientLeft; |
| 68 [PerWorldBindings] readonly attribute long clientTop; | 69 [PerWorldBindings] readonly attribute long clientTop; |
| 69 [PerWorldBindings] readonly attribute long clientWidth; | 70 [PerWorldBindings] readonly attribute long clientWidth; |
| 70 [PerWorldBindings] readonly attribute long clientHeight; | 71 [PerWorldBindings] readonly attribute long clientHeight; |
| 71 [PerWorldBindings] attribute long scrollLeft; | 72 |
| 72 [PerWorldBindings] attribute long scrollTop; | 73 // FIXME: should be: |
| 74 // [PerWorldBindings] attribute (Dictionary or long) scrollLeft; |
| 75 // [PerWorldBindings] attribute (Dictionary or long) scrollTop; |
| 76 // http://crbug.com/240176 |
| 77 [PerWorldBindings, Custom=Setter] attribute long scrollLeft; |
| 78 [PerWorldBindings, Custom=Setter] attribute long scrollTop; |
| 73 [PerWorldBindings] readonly attribute long scrollWidth; | 79 [PerWorldBindings] readonly attribute long scrollWidth; |
| 74 [PerWorldBindings] readonly attribute long scrollHeight; | 80 [PerWorldBindings] readonly attribute long scrollHeight; |
| 75 | 81 |
| 76 void focus(); | 82 void focus(); |
| 77 void blur(); | 83 void blur(); |
| 78 void scrollIntoView(optional boolean alignWithTop); | 84 void scrollIntoView(optional boolean alignWithTop); |
| 79 | 85 |
| 80 // WebKit extensions | 86 // WebKit extensions |
| 81 | 87 |
| 82 void scrollIntoViewIfNeeded(optional boolean centerIfNeeded); | 88 void scrollIntoViewIfNeeded(optional boolean centerIfNeeded); |
| 83 void scrollByLines([Default=Undefined] optional long lines); | 89 void scrollByLines([Default=Undefined] optional long lines); |
| 84 void scrollByPages([Default=Undefined] optional long pages); | 90 void scrollByPages([Default=Undefined] optional long pages); |
| 85 | 91 |
| 86 // HTML 5 | 92 // HTML 5 |
| 87 NodeList getElementsByClassName(DOMString classNames); | 93 HTMLCollection getElementsByClassName(DOMString classNames); |
| 88 [TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, ActivityL
ogging=SetterForIsolatedWorlds, RaisesException=Setter] attribute DOMString inne
rHTML; | 94 [TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, ActivityL
ogging=SetterForIsolatedWorlds, RaisesException=Setter] attribute DOMString inne
rHTML; |
| 89 [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] att
ribute DOMString outerHTML; | 95 [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] att
ribute DOMString outerHTML; |
| 96 |
| 97 [RaisesException, CustomElementCallbacks, MeasureAs=InsertAdjacentElement] E
lement insertAdjacentElement(DOMString where, Element element); |
| 98 [RaisesException, MeasureAs=InsertAdjacentText] void insertAdjacentText(DOMS
tring where, DOMString text); |
| 90 [CustomElementCallbacks, RaisesException] void insertAdjacentHTML(DOMString
where, DOMString html); | 99 [CustomElementCallbacks, RaisesException] void insertAdjacentHTML(DOMString
where, DOMString html); |
| 91 | 100 |
| 92 [Reflect=class, PerWorldBindings] attribute DOMString className; | 101 [Reflect=class, PerWorldBindings] attribute DOMString className; |
| 93 [PerWorldBindings] readonly attribute DOMTokenList classList; | 102 [PerWorldBindings] readonly attribute DOMTokenList classList; |
| 94 | 103 |
| 95 [PerWorldBindings] readonly attribute DOMStringMap dataset; | 104 [PerWorldBindings] readonly attribute DOMStringMap dataset; |
| 96 | 105 |
| 97 // NodeSelector - Selector API | 106 // NodeSelector - Selector API |
| 98 [RaisesException] Element querySelector(DOMString selectors); | 107 [RaisesException] Element querySelector(DOMString selectors); |
| 99 [RaisesException] NodeList querySelectorAll(DOMString selectors); | 108 [RaisesException] NodeList querySelectorAll(DOMString selectors); |
| 100 | 109 |
| 101 // WebKit extension | 110 // WebKit extension |
| 102 [RaisesException, MeasureAs=ElementPrefixedMatchesSelector] boolean webkitMa
tchesSelector([Default=Undefined] optional DOMString selectors); | 111 [RaisesException, ImplementedAs=matches, MeasureAs=ElementPrefixedMatchesSel
ector] boolean webkitMatchesSelector(DOMString selectors); |
| 103 | 112 |
| 104 // Shadow DOM API | 113 // Shadow DOM API |
| 105 [RuntimeEnabled=ShadowDOM, Reflect, TreatNullAs=NullString, PerWorldBindings
] attribute DOMString pseudo; | |
| 106 [RuntimeEnabled=ShadowDOM, RaisesException] ShadowRoot createShadowRoot(); | 114 [RuntimeEnabled=ShadowDOM, RaisesException] ShadowRoot createShadowRoot(); |
| 107 [RuntimeEnabled=ShadowDOM, PerWorldBindings] readonly attribute ShadowRoot s
hadowRoot; | 115 [RuntimeEnabled=ShadowDOM, PerWorldBindings] readonly attribute ShadowRoot s
hadowRoot; |
| 108 [RuntimeEnabled=ShadowDOM, PerWorldBindings] NodeList getDestinationInsertio
nPoints(); | 116 [RuntimeEnabled=ShadowDOM, PerWorldBindings] NodeList getDestinationInsertio
nPoints(); |
| 109 | 117 |
| 110 // To-be-deprecated prefixed Shadow DOM API | 118 // To-be-deprecated prefixed Shadow DOM API |
| 111 [Reflect=pseudo, TreatNullAs=NullString, ImplementedAs=pseudo, PerWorldBindi
ngs, MeasureAs=ShadowDOMPrefixedPseudo] attribute DOMString webkitPseudo; | |
| 112 [ImplementedAs=createShadowRoot, RaisesException, MeasureAs=ShadowDOMPrefixe
dCreateShadowRoot] ShadowRoot webkitCreateShadowRoot(); | 119 [ImplementedAs=createShadowRoot, RaisesException, MeasureAs=ShadowDOMPrefixe
dCreateShadowRoot] ShadowRoot webkitCreateShadowRoot(); |
| 113 [ImplementedAs=shadowRoot, PerWorldBindings, MeasureAs=ShadowDOMPrefixedShad
owRoot] readonly attribute ShadowRoot webkitShadowRoot; | 120 [ImplementedAs=shadowRoot, PerWorldBindings, MeasureAs=ShadowDOMPrefixedShad
owRoot] readonly attribute ShadowRoot webkitShadowRoot; |
| 114 | 121 |
| 115 // CSSOM View Module API | 122 // CSSOM View Module API |
| 116 ClientRectList getClientRects(); | 123 ClientRectList getClientRects(); |
| 117 ClientRect getBoundingClientRect(); | 124 ClientRect getBoundingClientRect(); |
| 118 | 125 |
| 119 // Mozilla version | 126 // Mozilla version |
| 120 const unsigned short ALLOW_KEYBOARD_INPUT = 1; | 127 const unsigned short ALLOW_KEYBOARD_INPUT = 1; |
| 121 [RuntimeEnabled=Fullscreen, PerWorldBindings, ActivityLogging=ForAllWorlds,
MeasureAs=PrefixedElementRequestFullScreen] void webkitRequestFullScreen([Defaul
t=Undefined] optional unsigned short flags); | 128 [RuntimeEnabled=Fullscreen, PerWorldBindings, ActivityLogging=ForAllWorlds,
MeasureAs=PrefixedElementRequestFullScreen] void webkitRequestFullScreen([Defaul
t=Undefined] optional unsigned short flags); |
| 122 | 129 |
| 123 // W3C version | 130 // W3C version |
| 124 [RuntimeEnabled=Fullscreen, PerWorldBindings, ActivityLogging=ForAllWorlds,
MeasureAs=PrefixedElementRequestFullscreen] void webkitRequestFullscreen(); | 131 [RuntimeEnabled=Fullscreen, PerWorldBindings, ActivityLogging=ForAllWorlds,
MeasureAs=PrefixedElementRequestFullscreen] void webkitRequestFullscreen(); |
| 125 | 132 |
| 126 void webkitRequestPointerLock(); | 133 void webkitRequestPointerLock(); |
| 127 | 134 |
| 128 // CSS Regions API | |
| 129 [RuntimeEnabled=CSSRegions, PerWorldBindings] readonly attribute DOMString w
ebkitRegionOverset; | |
| 130 [RuntimeEnabled=CSSRegions] sequence<Range> webkitGetRegionFlowRanges(); | |
| 131 | |
| 132 // Event handler attributes | 135 // Event handler attributes |
| 133 attribute EventHandler onbeforecopy; | 136 attribute EventHandler onbeforecopy; |
| 134 attribute EventHandler onbeforecut; | 137 attribute EventHandler onbeforecut; |
| 135 attribute EventHandler onbeforepaste; | 138 attribute EventHandler onbeforepaste; |
| 136 attribute EventHandler oncopy; | 139 attribute EventHandler oncopy; |
| 137 attribute EventHandler oncut; | 140 attribute EventHandler oncut; |
| 138 attribute EventHandler onpaste; | 141 attribute EventHandler onpaste; |
| 139 attribute EventHandler onsearch; | 142 attribute EventHandler onsearch; |
| 140 attribute EventHandler onselectstart; | 143 attribute EventHandler onselectstart; |
| 141 [RuntimeEnabled=Touch] attribute EventHandler ontouchcancel; | 144 [RuntimeEnabled=Touch] attribute EventHandler ontouchcancel; |
| 142 [RuntimeEnabled=Touch] attribute EventHandler ontouchend; | 145 [RuntimeEnabled=Touch] attribute EventHandler ontouchend; |
| 143 [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; | 146 [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; |
| 144 [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; | 147 [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; |
| 145 attribute EventHandler onwebkitfullscreenchange; | 148 attribute EventHandler onwebkitfullscreenchange; |
| 146 attribute EventHandler onwebkitfullscreenerror; | 149 attribute EventHandler onwebkitfullscreenerror; |
| 147 [PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute EventH
andler onwheel; | 150 [PerWorldBindings, ActivityLogging=SetterForIsolatedWorlds] attribute EventH
andler onwheel; |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 Element implements ParentNode; | 153 Element implements ParentNode; |
| 151 Element implements ChildNode; | 154 Element implements ChildNode; |
| OLD | NEW |