| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org> | 3 * Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org> |
| 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 callback CustomElementConstructor = Element (); | 21 callback CustomElementConstructor = Element (); |
| 22 | 22 |
| 23 [ | 23 [ |
| 24 SpecialWrapFor=HTMLDocument|SVGDocument | 24 SpecialWrapFor=HTMLDocument|XMLDocument |
| 25 ] interface Document : Node { | 25 ] interface Document : Node { |
| 26 | 26 |
| 27 // DOM Level 1 Core | 27 // DOM Level 1 Core |
| 28 readonly attribute DocumentType doctype; | 28 readonly attribute DocumentType doctype; |
| 29 readonly attribute DOMImplementation implementation; | 29 readonly attribute DOMImplementation implementation; |
| 30 readonly attribute Element documentElement; | 30 readonly attribute Element documentElement; |
| 31 | 31 |
| 32 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Element createElement(DOMString tagName); | 32 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Element createElement(DOMString tagName); |
| 33 DocumentFragment createDocumentFragment(); | 33 DocumentFragment createDocumentFragment(); |
| 34 [PerWorldBindings] Text createTextNode(DOMString data); | 34 [PerWorldBindings] Text createTextNode(DOMString data); |
| 35 Comment createComment(DOMString data); | 35 Comment createComment(DOMString data); |
| 36 [RaisesException, MeasureAs=DocumentCreateCDATASection] CDATASection createC
DATASection([Default=Undefined] optional DOMString data); // Removed from DOM4. | 36 [RaisesException, MeasureAs=DocumentCreateCDATASection] CDATASection createC
DATASection([Default=Undefined] optional DOMString data); // Removed from DOM4. |
| 37 [RaisesException] ProcessingInstruction createProcessingInstruction(DOMStrin
g target, DOMString data); | 37 [RaisesException] ProcessingInstruction createProcessingInstruction(DOMStrin
g target, DOMString data); |
| 38 [RaisesException, MeasureAs=DocumentCreateAttribute] Attr createAttribute([D
efault=Undefined] optional DOMString name); // Removed from DOM4. | 38 [RaisesException, MeasureAs=DocumentCreateAttribute] Attr createAttribute([D
efault=Undefined] optional DOMString name); // Removed from DOM4. |
| 39 [PerWorldBindings] NodeList getElementsByTagName(DOMString localName); | 39 [PerWorldBindings] HTMLCollection getElementsByTagName(DOMString localName); |
| 40 | 40 |
| 41 // Introduced in DOM Level 2: | 41 // Introduced in DOM Level 2: |
| 42 | 42 |
| 43 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Node importNode(Node node, optional boolean deep); | 43 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Node importNode(Node node, optional boolean deep); |
| 44 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Element createElementNS([TreatNullAs=NullString] DOMString na
mespaceURI, DOMString qualifiedName); | 44 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Element createElementNS([TreatNullAs=NullString] DOMString na
mespaceURI, DOMString qualifiedName); |
| 45 [RaisesException, MeasureAs=DocumentCreateAttributeNS] Attr createAttributeN
S([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI, | 45 HTMLCollection getElementsByTagNameNS([TreatNullAs=NullString] DOMString nam
espaceURI, DOMString localName); |
| 46
[TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName);
// Removed from DOM4. | |
| 47 NodeList getElementsByTagNameNS([TreatNullAs=NullString] DOMString namespace
URI, DOMString localName); | |
| 48 [PerWorldBindings] Element getElementById(DOMString elementId); | 46 [PerWorldBindings] Element getElementById(DOMString elementId); |
| 49 | 47 |
| 50 // DOM Level 3 Core | 48 // DOM Level 3 Core |
| 51 | 49 |
| 52 [TreatReturnedNullStringAs=Null, MeasureAs=DocumentInputEncoding] readonly a
ttribute DOMString inputEncoding; // Removed from DOM4. | 50 [TreatReturnedNullStringAs=Null, MeasureAs=DocumentInputEncoding] readonly a
ttribute DOMString inputEncoding; // Removed from DOM4. |
| 53 | 51 |
| 54 [TreatReturnedNullStringAs=Null, MeasureAs=DocumentXMLEncoding] readonly att
ribute DOMString xmlEncoding; // Removed from DOM4. | 52 [TreatReturnedNullStringAs=Null, MeasureAs=DocumentXMLEncoding] readonly att
ribute DOMString xmlEncoding; // Removed from DOM4. |
| 55 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, RaisesException=Set
ter, MeasureAs=DocumentXMLVersion] attribute DOMString xmlVersion; // Removed fr
om DOM4. | 53 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, RaisesException=Set
ter, MeasureAs=DocumentXMLVersion] attribute DOMString xmlVersion; // Removed fr
om DOM4. |
| 56 [RaisesException=Setter, MeasureAs=DocumentXMLStandalone] attribute boolean
xmlStandalone; // Removed from DOM4. | 54 [RaisesException=Setter, MeasureAs=DocumentXMLStandalone] attribute boolean
xmlStandalone; // Removed from DOM4. |
| 57 | 55 |
| 58 [RaisesException, CustomElementCallbacks] Node adoptNode(Node node); | 56 [RaisesException, CustomElementCallbacks] Node adoptNode(Node node); |
| 59 | 57 |
| 60 [TreatReturnedNullStringAs=Null] readonly attribute DOMString documentURI; | 58 [TreatReturnedNullStringAs=Null, ImplementedAs=url] readonly attribute DOMSt
ring documentURI; |
| 61 | 59 |
| 62 // DOM Level 2 Events (DocumentEvents interface) | 60 // DOM Level 2 Events (DocumentEvents interface) |
| 63 | 61 |
| 64 [RaisesException] Event createEvent(DOMString eventType); | 62 [RaisesException] Event createEvent(optional DOMString eventType); |
| 65 | 63 |
| 66 // DOM Level 2 Traversal and Range (DocumentRange interface) | 64 // DOM Level 2 Traversal and Range (DocumentRange interface) |
| 67 | 65 |
| 68 Range createRange(); | 66 Range createRange(); |
| 69 | 67 |
| 70 // DOM Level 2 Traversal and Range (DocumentTraversal interface) | 68 // DOM Level 2 Traversal and Range (DocumentTraversal interface) |
| 71 | 69 |
| 72 [RaisesException] NodeIterator createNodeIterator(Node root, | 70 [RaisesException] NodeIterator createNodeIterator(Node root, |
| 73 optional unsigned long wha
tToShow, | 71 optional unsigned long wha
tToShow, |
| 74 optional NodeFilter filter
); | 72 optional NodeFilter filter
); |
| 75 [RaisesException] TreeWalker createTreeWalker(Node root, | 73 [RaisesException] TreeWalker createTreeWalker(Node root, |
| 76 optional unsigned long whatToS
how, | 74 optional unsigned long whatToS
how, |
| 77 optional NodeFilter filter); | 75 optional NodeFilter filter); |
| 78 | 76 |
| 79 // DOM Level 2 Abstract Views (DocumentView interface) | 77 // DOM Level 2 Abstract Views (DocumentView interface) |
| 80 | 78 |
| 81 [ImplementedAs=domWindow] readonly attribute Window defaultView; | 79 [ImplementedAs=executingWindow] readonly attribute Window defaultView; |
| 82 | 80 |
| 83 // DOM Level 2 Style (DocumentStyle interface) | 81 // DOM Level 2 Style (DocumentStyle interface) |
| 84 | 82 |
| 85 readonly attribute StyleSheetList styleSheets; | 83 readonly attribute StyleSheetList styleSheets; |
| 86 | 84 |
| 87 // DOM Level 2 Style (DocumentCSS interface) | 85 // DOM Level 2 Style (DocumentCSS interface) |
| 88 | 86 |
| 89 CSSStyleDeclaration getOverrideStyle([Default=Undefined] optional Element e
lement, | 87 CSSStyleDeclaration getOverrideStyle([Default=Undefined] optional Element e
lement, |
| 90 [Default=Undefined] opti
onal DOMString pseudoElement); | 88 [Default=Undefined] opti
onal DOMString pseudoElement); |
| 91 | 89 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 103 | 101 |
| 104 // Moved down from HTMLDocument | 102 // Moved down from HTMLDocument |
| 105 | 103 |
| 106 [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMStrin
g title; | 104 [TreatNullAs=NullString, CustomElementCallbacks] attribute DOMStrin
g title; |
| 107 readonly attribute DOMString referrer; | 105 readonly attribute DOMString referrer; |
| 108 [TreatNullAs=NullString, RaisesException=Setter] attribute DOMStrin
g domain; | 106 [TreatNullAs=NullString, RaisesException=Setter] attribute DOMStrin
g domain; |
| 109 readonly attribute DOMString URL; | 107 readonly attribute DOMString URL; |
| 110 | 108 |
| 111 [TreatNullAs=NullString, RaisesException] attribute DOMString cooki
e; | 109 [TreatNullAs=NullString, RaisesException] attribute DOMString cooki
e; |
| 112 | 110 |
| 113 [RaisesException=Setter, CustomElementCallbacks] attribute HTMLElem
ent body; | 111 [RaisesException=Setter, CustomElementCallbacks, PerWorldBindings]
attribute HTMLElement body; |
| 114 | 112 |
| 115 readonly attribute HTMLHeadElement head; | 113 readonly attribute HTMLHeadElement head; |
| 116 readonly attribute HTMLCollection images; | 114 readonly attribute HTMLCollection images; |
| 117 readonly attribute HTMLCollection applets; | 115 readonly attribute HTMLCollection applets; |
| 118 readonly attribute HTMLCollection links; | 116 readonly attribute HTMLCollection links; |
| 119 readonly attribute HTMLCollection forms; | 117 readonly attribute HTMLCollection forms; |
| 120 readonly attribute HTMLCollection anchors; | 118 readonly attribute HTMLCollection anchors; |
| 121 readonly attribute DOMString lastModified; | 119 readonly attribute DOMString lastModified; |
| 122 | 120 |
| 123 [PerWorldBindings] NodeList getElementsByName([Default=Undefined] optional D
OMString elementName); | 121 [PerWorldBindings] NodeList getElementsByName([Default=Undefined] optional D
OMString elementName); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 139 [TreatReturnedNullStringAs=Null] readonly attribute DOMString characterSet; | 137 [TreatReturnedNullStringAs=Null] readonly attribute DOMString characterSet; |
| 140 | 138 |
| 141 // WebKit extensions | 139 // WebKit extensions |
| 142 | 140 |
| 143 [TreatReturnedNullStringAs=Null] readonly attribute DOMString preferredStyle
sheetSet; | 141 [TreatReturnedNullStringAs=Null] readonly attribute DOMString preferredStyle
sheetSet; |
| 144 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute
DOMString selectedStylesheetSet; | 142 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute
DOMString selectedStylesheetSet; |
| 145 | 143 |
| 146 CanvasRenderingContext getCSSCanvasContext(DOMString contextId, DOMString na
me, long width, long height); | 144 CanvasRenderingContext getCSSCanvasContext(DOMString contextId, DOMString na
me, long width, long height); |
| 147 | 145 |
| 148 // HTML 5 | 146 // HTML 5 |
| 149 NodeList getElementsByClassName(DOMString classNames); | 147 HTMLCollection getElementsByClassName(DOMString classNames); |
| 148 readonly attribute Element activeElement; |
| 149 boolean hasFocus(); |
| 150 | 150 |
| 151 readonly attribute DOMString compatMode; | 151 readonly attribute DOMString compatMode; |
| 152 | 152 |
| 153 // NodeSelector - Selector API | 153 // NodeSelector - Selector API |
| 154 [RaisesException] Element querySelector(DOMString selectors); | 154 [RaisesException] Element querySelector(DOMString selectors); |
| 155 [RaisesException] NodeList querySelectorAll(DOMString selectors); | 155 [RaisesException] NodeList querySelectorAll(DOMString selectors); |
| 156 | 156 |
| 157 void webkitExitPointerLock(); | 157 void webkitExitPointerLock(); |
| 158 readonly attribute Element webkitPointerLockElement; | 158 readonly attribute Element webkitPointerLockElement; |
| 159 | 159 |
| 160 [RuntimeEnabled=CSSRegions] WebKitNamedFlowCollection webkitGetNamedFlows(); | |
| 161 | |
| 162 // Event handler attributes | 160 // Event handler attributes |
| 163 attribute EventHandler onbeforecopy; | 161 attribute EventHandler onbeforecopy; |
| 164 attribute EventHandler onbeforecut; | 162 attribute EventHandler onbeforecut; |
| 165 attribute EventHandler onbeforepaste; | 163 attribute EventHandler onbeforepaste; |
| 166 attribute EventHandler oncopy; | 164 attribute EventHandler oncopy; |
| 167 attribute EventHandler oncut; | 165 attribute EventHandler oncut; |
| 168 attribute EventHandler onpaste; | 166 attribute EventHandler onpaste; |
| 169 attribute EventHandler onreadystatechange; | 167 attribute EventHandler onreadystatechange; |
| 170 attribute EventHandler onsearch; | 168 attribute EventHandler onsearch; |
| 171 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa
ndler onsecuritypolicyviolation; | 169 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] attribute EventHa
ndler onsecuritypolicyviolation; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 187 [Default=Undefined] optional long
pageX, | 185 [Default=Undefined] optional long
pageX, |
| 188 [Default=Undefined] optional long
pageY, | 186 [Default=Undefined] optional long
pageY, |
| 189 [Default=Undefined] optional long
screenX, | 187 [Default=Undefined] optional long
screenX, |
| 190 [Default=Undefined] optional long
screenY, | 188 [Default=Undefined] optional long
screenY, |
| 191 [Default=Undefined] optional long
webkitRadiusX, | 189 [Default=Undefined] optional long
webkitRadiusX, |
| 192 [Default=Undefined] optional long
webkitRadiusY, | 190 [Default=Undefined] optional long
webkitRadiusY, |
| 193 [Default=Undefined] optional floa
t webkitRotationAngle, | 191 [Default=Undefined] optional floa
t webkitRotationAngle, |
| 194 [Default=Undefined] optional floa
t webkitForce); | 192 [Default=Undefined] optional floa
t webkitForce); |
| 195 [RuntimeEnabled=Touch] TouchList createTouchList(Touch... touches); | 193 [RuntimeEnabled=Touch] TouchList createTouchList(Touch... touches); |
| 196 | 194 |
| 197 [DeprecateAs=PrefixedDocumentRegister, RuntimeEnabled=CustomElements, Implem
entedAs=registerElement, CallWith=ScriptState, CustomElementCallbacks, RaisesExc
eption] CustomElementConstructor webkitRegister(DOMString name, optional Diction
ary options); | 195 [CallWith=ScriptState, CustomElementCallbacks, RaisesException] CustomElemen
tConstructor registerElement(DOMString name, optional Dictionary options); |
| 198 [RuntimeEnabled=CustomElements, ImplementedAs=registerElement, CallWith=Scri
ptState, CustomElementCallbacks, RaisesException] CustomElementConstructor regis
ter(DOMString name, optional Dictionary options); | |
| 199 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Element createElement(DOMString localName, [TreatNullAs=NullS
tring] DOMString typeExtension); | 196 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Element createElement(DOMString localName, [TreatNullAs=NullS
tring] DOMString typeExtension); |
| 200 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Element createElementNS([TreatNullAs=NullString] DOMString na
mespaceURI, DOMString qualifiedName, | 197 [CustomElementCallbacks, PerWorldBindings, ActivityLogging=ForIsolatedWorlds
, RaisesException] Element createElementNS([TreatNullAs=NullString] DOMString na
mespaceURI, DOMString qualifiedName, |
| 201 [TreatNullAs=NullString] DOMString typeExtension); | 198 [TreatNullAs=NullString] DOMString typeExtension); |
| 202 | 199 |
| 203 // Page visibility API. | 200 // Page visibility API. |
| 204 readonly attribute DOMString visibilityState; | 201 readonly attribute DOMString visibilityState; |
| 205 readonly attribute boolean hidden; | 202 readonly attribute boolean hidden; |
| 206 | 203 |
| 207 // Deprecated prefixed page visibility API. | 204 // Deprecated prefixed page visibility API. |
| 208 // TODO(davidben): This is a property so attaching a deprecation warning res
ults in false positives when outputting | 205 // TODO(davidben): This is a property so attaching a deprecation warning res
ults in false positives when outputting |
| 209 // document in the console. It's possible http://crbug.com/43394 will resolv
e this. | 206 // document in the console. It's possible http://crbug.com/43394 will resolv
e this. |
| 210 [MeasureAs=PrefixedPageVisibility, ImplementedAs=visibilityState] readonly a
ttribute DOMString webkitVisibilityState; | 207 [MeasureAs=PrefixedPageVisibility, ImplementedAs=visibilityState] readonly a
ttribute DOMString webkitVisibilityState; |
| 211 [MeasureAs=PrefixedPageVisibility, ImplementedAs=hidden] readonly attribute
boolean webkitHidden; | 208 [MeasureAs=PrefixedPageVisibility, ImplementedAs=hidden] readonly attribute
boolean webkitHidden; |
| 212 | 209 |
| 213 // Security Policy API: http://dvcs.w3.org/hg/content-security-policy/raw-fi
le/tip/csp-specification.dev.html#script-interfaces | |
| 214 [RuntimeEnabled=ExperimentalContentSecurityPolicyFeatures] readonly attribut
e SecurityPolicy securityPolicy; | |
| 215 | |
| 216 readonly attribute HTMLScriptElement currentScript; | 210 readonly attribute HTMLScriptElement currentScript; |
| 217 }; | 211 }; |
| 218 | 212 |
| 219 Document implements GlobalEventHandlers; | 213 Document implements GlobalEventHandlers; |
| 220 Document implements ParentNode; | 214 Document implements ParentNode; |
| 215 |
| OLD | NEW |