| 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 (); |
| 22 |
| 21 [ | 23 [ |
| 22 CustomToV8 | 24 CustomToV8 |
| 23 ] interface Document : Node { | 25 ] interface Document : Node { |
| 24 | 26 |
| 25 // DOM Level 1 Core | 27 // DOM Level 1 Core |
| 26 readonly attribute DocumentType doctype; | 28 readonly attribute DocumentType doctype; |
| 27 readonly attribute DOMImplementation implementation; | 29 readonly attribute DOMImplementation implementation; |
| 28 readonly attribute Element documentElement; | 30 readonly attribute Element documentElement; |
| 29 | 31 |
| 30 [DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsola
tedWorlds, RaisesException] Element createElement([TreatNullAs=NullString,Defaul
t=Undefined] optional DOMString tagName); | 32 [DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsola
tedWorlds, RaisesException] Element createElement([TreatNullAs=NullString,Defaul
t=Undefined] optional DOMString tagName); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 58 [SetterRaisesException] attribute boolean xmlStandalone; | 60 [SetterRaisesException] attribute boolean xmlStandalone; |
| 59 | 61 |
| 60 [RaisesException] Node adoptNode([Default=Undefined] optional
Node source); | 62 [RaisesException] Node adoptNode([Default=Undefined] optional
Node source); |
| 61 | 63 |
| 62 [TreatReturnedNullStringAs=Null] readonly attribute DOMString documentURI; | 64 [TreatReturnedNullStringAs=Null] readonly attribute DOMString documentURI; |
| 63 | 65 |
| 64 // DOM Level 2 Events (DocumentEvents interface) | 66 // DOM Level 2 Events (DocumentEvents interface) |
| 65 | 67 |
| 66 [RaisesException] Event createEvent([Default=Undefined] optiona
l DOMString eventType); | 68 [RaisesException] Event createEvent([Default=Undefined] optiona
l DOMString eventType); |
| 67 | 69 |
| 68 // DOM Level 2 Tranversal and Range (DocumentRange interface) | 70 // DOM Level 2 Traversal and Range (DocumentRange interface) |
| 69 | 71 |
| 70 Range createRange(); | 72 Range createRange(); |
| 71 | 73 |
| 72 // DOM Level 2 Tranversal and Range (DocumentTraversal interface) | 74 // DOM Level 2 Traversal and Range (DocumentTraversal interface) |
| 73 | 75 // In DOM4, the fourth argument |expandEntityReferences| is removed. |
| 74 [RaisesException] NodeIterator createNodeIterator([Default=Undefined] optio
nal Node root, | 76 // Historically, this argument was never implemented and has been ignored. |
| 75 [Default=Undefined] optional
unsigned long whatToShow, | 77 // We still receive the argument to keep compatibility, but don't do anythin
g if it's specified. |
| 76 [Default=Undefined] optional
NodeFilter filter, | 78 [RaisesException] NodeIterator createNodeIterator(Node root, |
| 77 [Default=Undefined] optional
boolean expandEntityReferences); | 79 optional unsigned long wha
tToShow, |
| 78 [RaisesException] TreeWalker createTreeWalker([Default=Undefined] optional
Node root, | 80 optional NodeFilter filter
, |
| 79 [Default=Undefined] optional unsi
gned long whatToShow, | 81 optional boolean expandEnt
ityReferences); |
| 80 [Default=Undefined] optional Node
Filter filter, | 82 [RaisesException] TreeWalker createTreeWalker(Node root, |
| 81 [Default=Undefined] optional bool
ean expandEntityReferences); | 83 optional unsigned long whatToS
how, |
| 84 optional NodeFilter filter, |
| 85 optional boolean expandEntityR
eferences); |
| 82 | 86 |
| 83 // DOM Level 2 Abstract Views (DocumentView interface) | 87 // DOM Level 2 Abstract Views (DocumentView interface) |
| 84 | 88 |
| 85 readonly attribute DOMWindow defaultView; | 89 readonly attribute Window defaultView; |
| 86 | 90 |
| 87 // DOM Level 2 Style (DocumentStyle interface) | 91 // DOM Level 2 Style (DocumentStyle interface) |
| 88 | 92 |
| 89 readonly attribute StyleSheetList styleSheets; | 93 readonly attribute StyleSheetList styleSheets; |
| 90 | 94 |
| 91 // DOM Level 2 Style (DocumentCSS interface) | 95 // DOM Level 2 Style (DocumentCSS interface) |
| 92 | 96 |
| 93 CSSStyleDeclaration getOverrideStyle([Default=Undefined] optional Element e
lement, | 97 CSSStyleDeclaration getOverrideStyle([Default=Undefined] optional Element e
lement, |
| 94 [Default=Undefined] opti
onal DOMString pseudoElement); | 98 [Default=Undefined] opti
onal DOMString pseudoElement); |
| 95 | 99 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 166 |
| 163 // HTML 5 | 167 // HTML 5 |
| 164 NodeList getElementsByClassName([Default=Undefined] optional DOMString tagna
me); | 168 NodeList getElementsByClassName([Default=Undefined] optional DOMString tagna
me); |
| 165 | 169 |
| 166 readonly attribute DOMString compatMode; | 170 readonly attribute DOMString compatMode; |
| 167 | 171 |
| 168 // NodeSelector - Selector API | 172 // NodeSelector - Selector API |
| 169 [RaisesException] Element querySelector(DOMString selectors); | 173 [RaisesException] Element querySelector(DOMString selectors); |
| 170 [RaisesException] NodeList querySelectorAll(DOMString selectors); | 174 [RaisesException] NodeList querySelectorAll(DOMString selectors); |
| 171 | 175 |
| 172 // Mozilla version | |
| 173 [EnabledAtRuntime=fullscreen] readonly attribute boolean webkitIsFullScreen; | |
| 174 [EnabledAtRuntime=fullscreen] readonly attribute boolean webkitFullScreenKey
boardInputAllowed; | |
| 175 [EnabledAtRuntime=fullscreen] readonly attribute Element webkitCurrentFullSc
reenElement; | |
| 176 [EnabledAtRuntime=fullscreen] void webkitCancelFullScreen(); | |
| 177 | |
| 178 // W3C version | |
| 179 [EnabledAtRuntime=fullscreen] readonly attribute boolean webkitFullscreenEna
bled; | |
| 180 [EnabledAtRuntime=fullscreen] readonly attribute Element webkitFullscreenEle
ment; | |
| 181 [EnabledAtRuntime=fullscreen] void webkitExitFullscreen(); | |
| 182 | |
| 183 void webkitExitPointerLock(); | 176 void webkitExitPointerLock(); |
| 184 readonly attribute Element webkitPointerLockElement; | 177 readonly attribute Element webkitPointerLockElement; |
| 185 | 178 |
| 186 [EnabledAtRuntime=cssRegions] DOMNamedFlowCollection webkitGetNamedFlows(); | 179 [EnabledAtRuntime=cssRegions] WebKitNamedFlowCollection webkitGetNamedFlows(
); |
| 187 | 180 |
| 188 [EnabledAtRuntime=fontLoadEvents] readonly attribute FontLoader fontloader; | 181 [EnabledAtRuntime=fontLoadEvents] readonly attribute FontLoader fontloader; |
| 189 | 182 |
| 190 // Event handler DOM attributes | 183 // Event handler DOM attributes |
| 191 [NotEnumerable] attribute EventListener onabort; | 184 [NotEnumerable] attribute EventListener onabort; |
| 192 [NotEnumerable] attribute EventListener onblur; | 185 [NotEnumerable] attribute EventListener onblur; |
| 193 [NotEnumerable] attribute EventListener onchange; | 186 [NotEnumerable] attribute EventListener onchange; |
| 194 [NotEnumerable] attribute EventListener onclick; | 187 [NotEnumerable] attribute EventListener onclick; |
| 195 [NotEnumerable] attribute EventListener oncontextmenu; | 188 [NotEnumerable] attribute EventListener oncontextmenu; |
| 196 [NotEnumerable] attribute EventListener ondblclick; | 189 [NotEnumerable] attribute EventListener ondblclick; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchstart; | 249 [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchstart; |
| 257 [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchmove; | 250 [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchmove; |
| 258 [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchend; | 251 [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchend; |
| 259 [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchcancel
; | 252 [NotEnumerable,EnabledAtRuntime=touch] attribute EventListener ontouchcancel
; |
| 260 [NotEnumerable] attribute EventListener onwebkitfullscreenchange; | 253 [NotEnumerable] attribute EventListener onwebkitfullscreenchange; |
| 261 [NotEnumerable] attribute EventListener onwebkitfullscreenerror; | 254 [NotEnumerable] attribute EventListener onwebkitfullscreenerror; |
| 262 [NotEnumerable] attribute EventListener onwebkitpointerlockchange; | 255 [NotEnumerable] attribute EventListener onwebkitpointerlockchange; |
| 263 [NotEnumerable] attribute EventListener onwebkitpointerlockerror; | 256 [NotEnumerable] attribute EventListener onwebkitpointerlockerror; |
| 264 [NotEnumerable, EnabledAtRuntime=experimentalContentSecurityPolicyFeatures]
attribute EventListener onsecuritypolicyviolation; | 257 [NotEnumerable, EnabledAtRuntime=experimentalContentSecurityPolicyFeatures]
attribute EventListener onsecuritypolicyviolation; |
| 265 | 258 |
| 266 [EnabledAtRuntime=touch] Touch createTouch([Default=Undefined] optional DOMW
indow window, | 259 [EnabledAtRuntime=touch] Touch createTouch([Default=Undefined] optional Wind
ow window, |
| 267 [Default=Undefined] optional Even
tTarget target, | 260 [Default=Undefined] optional Even
tTarget target, |
| 268 [Default=Undefined] optional long
identifier, | 261 [Default=Undefined] optional long
identifier, |
| 269 [Default=Undefined] optional long
pageX, | 262 [Default=Undefined] optional long
pageX, |
| 270 [Default=Undefined] optional long
pageY, | 263 [Default=Undefined] optional long
pageY, |
| 271 [Default=Undefined] optional long
screenX, | 264 [Default=Undefined] optional long
screenX, |
| 272 [Default=Undefined] optional long
screenY, | 265 [Default=Undefined] optional long
screenY, |
| 273 [Default=Undefined] optional long
webkitRadiusX, | 266 [Default=Undefined] optional long
webkitRadiusX, |
| 274 [Default=Undefined] optional long
webkitRadiusY, | 267 [Default=Undefined] optional long
webkitRadiusY, |
| 275 [Default=Undefined] optional floa
t webkitRotationAngle, | 268 [Default=Undefined] optional floa
t webkitRotationAngle, |
| 276 [Default=Undefined] optional floa
t webkitForce); | 269 [Default=Undefined] optional floa
t webkitForce); |
| 277 [EnabledAtRuntime=touch, Custom, RaisesException] TouchList createTouchList(
); | 270 [EnabledAtRuntime=touch, Custom, RaisesException] TouchList createTouchList(
); |
| 278 | 271 |
| 279 [EnabledAtRuntime=customDOMElements, ImplementedAs=registerElement, CallWith
=ScriptState, DeliverCustomElementCallbacks, RaisesException] CustomElementConst
ructor webkitRegister(DOMString name, optional Dictionary options); | 272 [DeprecateAs=PrefixedDocumentRegister, EnabledAtRuntime=customDOMElements, I
mplementedAs=registerElement, CallWith=ScriptState, DeliverCustomElementCallback
s, RaisesException] CustomElementConstructor webkitRegister(DOMString name, opti
onal Dictionary options); |
| 273 [EnabledAtRuntime=customDOMElements, ImplementedAs=registerElement, CallWith
=ScriptState, DeliverCustomElementCallbacks, RaisesException] CustomElementConst
ructor register(DOMString name, optional Dictionary options); |
| 280 [DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsola
tedWorlds, RaisesException] Element createElement(DOMString localName, [TreatNul
lAs=NullString] DOMString typeExtension); | 274 [DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsola
tedWorlds, RaisesException] Element createElement(DOMString localName, [TreatNul
lAs=NullString] DOMString typeExtension); |
| 281 [DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsola
tedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString] DOM
String namespaceURI, DOMString qualifiedName, | 275 [DeliverCustomElementCallbacks, PerWorldBindings, ActivityLog=AccessForIsola
tedWorlds, RaisesException] Element createElementNS([TreatNullAs=NullString] DOM
String namespaceURI, DOMString qualifiedName, |
| 282 [TreatNullAs=NullString] DOMString typeExtension); | 276 [TreatNullAs=NullString] DOMString typeExtension); |
| 283 | 277 |
| 284 // Page visibility API. | 278 // Page visibility API. |
| 285 readonly attribute DOMString webkitVisibilityState; | 279 readonly attribute DOMString webkitVisibilityState; |
| 286 readonly attribute boolean webkitHidden; | 280 readonly attribute boolean webkitHidden; |
| 287 | 281 |
| 288 // Security Policy API: http://dvcs.w3.org/hg/content-security-policy/raw-fi
le/tip/csp-specification.dev.html#script-interfaces | 282 // Security Policy API: http://dvcs.w3.org/hg/content-security-policy/raw-fi
le/tip/csp-specification.dev.html#script-interfaces |
| 289 [EnabledAtRuntime=experimentalContentSecurityPolicyFeatures] readonly attrib
ute SecurityPolicy securityPolicy; | 283 [EnabledAtRuntime=experimentalContentSecurityPolicyFeatures] readonly attrib
ute SecurityPolicy securityPolicy; |
| 290 | 284 |
| 291 // ParentNode interface API | 285 readonly attribute HTMLScriptElement currentScript; |
| 292 readonly attribute HTMLCollection children; | |
| 293 readonly attribute Element firstElementChild; | |
| 294 readonly attribute Element lastElementChild; | |
| 295 readonly attribute unsigned long childElementCount; | |
| 296 }; | 286 }; |
| 297 | 287 |
| 288 Document implements ParentNode; |
| 289 |
| OLD | NEW |