2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
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
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
25 GenerateNativeConverter,
27 InlineGetOwnPropertySlot
31 readonly attribute DocumentType doctype;
32 readonly attribute [V8Custom] DOMImplementation implementation;
33 readonly attribute Element documentElement;
35 [ReturnsNew] Element createElement(in [ConvertNullToNullString] DOMString tagName)
36 raises (DOMException);
37 DocumentFragment createDocumentFragment();
38 [ReturnsNew] Text createTextNode(in DOMString data);
39 [ReturnsNew] Comment createComment(in DOMString data);
40 [ReturnsNew] CDATASection createCDATASection(in DOMString data)
42 [OldStyleObjC, ReturnsNew] ProcessingInstruction createProcessingInstruction(in DOMString target,
44 raises (DOMException);
45 [ReturnsNew] Attr createAttribute(in DOMString name)
46 raises (DOMException);
47 [ReturnsNew] EntityReference createEntityReference(in DOMString name)
49 NodeList getElementsByTagName(in DOMString tagname);
51 // Introduced in DOM Level 2:
53 [OldStyleObjC, ReturnsNew] Node importNode(in Node importedNode,
55 raises (DOMException);
56 [OldStyleObjC, ReturnsNew] Element createElementNS(in [ConvertNullToNullString] DOMString namespaceURI,
57 in [ConvertNullToNullString] DOMString qualifiedName)
58 raises (DOMException);
59 [OldStyleObjC, ReturnsNew] Attr createAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
60 in [ConvertNullToNullString] DOMString qualifiedName)
61 raises (DOMException);
62 [OldStyleObjC] NodeList getElementsByTagNameNS(in [ConvertNullToNullString] DOMString namespaceURI,
63 in DOMString localName);
64 Element getElementById(in DOMString elementId);
68 readonly attribute [ConvertNullStringTo=Null] DOMString inputEncoding;
70 readonly attribute [ConvertNullStringTo=Null] DOMString xmlEncoding;
71 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString xmlVersion
72 setter raises (DOMException);
73 attribute boolean xmlStandalone
74 setter raises (DOMException);
76 Node adoptNode(in Node source)
77 raises (DOMException);
79 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString documentURI;
81 // DOM Level 2 Events (DocumentEvents interface)
83 Event createEvent(in DOMString eventType)
86 // DOM Level 2 Tranversal and Range (DocumentRange interface)
90 // DOM Level 2 Tranversal and Range (DocumentTraversal interface)
92 [OldStyleObjC] NodeIterator createNodeIterator(in Node root,
93 in unsigned long whatToShow,
95 in boolean expandEntityReferences)
97 [OldStyleObjC] TreeWalker createTreeWalker(in Node root,
98 in unsigned long whatToShow,
100 in boolean expandEntityReferences)
101 raises(DOMException);
103 // DOM Level 2 Abstract Views (DocumentView interface)
105 readonly attribute DOMWindow defaultView;
107 // DOM Level 2 Style (DocumentStyle interface)
109 readonly attribute StyleSheetList styleSheets;
111 // DOM Level 2 Style (DocumentCSS interface)
113 [OldStyleObjC] CSSStyleDeclaration getOverrideStyle(in Element element,
114 in DOMString pseudoElement);
115 #if defined(ENABLE_XPATH) && ENABLE_XPATH
116 // DOM Level 3 XPath (XPathEvaluator interface)
117 [OldStyleObjC] XPathExpression createExpression(in DOMString expression,
118 in XPathNSResolver resolver)
119 raises(DOMException);
120 XPathNSResolver createNSResolver(in Node nodeResolver);
121 [OldStyleObjC, V8Custom] XPathResult evaluate(in DOMString expression,
123 in XPathNSResolver resolver,
124 in unsigned short type,
125 in XPathResult inResult)
126 raises(DOMException);
127 #endif // ENABLE_XPATH
131 boolean execCommand(in DOMString command,
132 in boolean userInterface,
133 in [ConvertUndefinedOrNullToNullString] DOMString value);
135 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
136 // FIXME: remove the these two versions once [Optional] is implemented for Objective-C.
137 boolean execCommand(in DOMString command,
138 in boolean userInterface);
139 boolean execCommand(in DOMString command);
142 boolean queryCommandEnabled(in DOMString command);
143 boolean queryCommandIndeterm(in DOMString command);
144 boolean queryCommandState(in DOMString command);
145 boolean queryCommandSupported(in DOMString command);
146 [ConvertNullStringTo=False] DOMString queryCommandValue(in DOMString command);
148 // Moved down from HTMLDocument
150 attribute [ConvertNullToNullString] DOMString title;
151 readonly attribute DOMString referrer;
152 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
153 attribute [ConvertNullToNullString] DOMString domain
154 setter raises (DOMException);
156 readonly attribute DOMString domain;
158 readonly attribute DOMString URL;
160 attribute [ConvertNullToNullString] DOMString cookie
161 setter raises (DOMException),
162 getter raises (DOMException);
164 // FIXME: the DOM spec does NOT have this attribute
165 // raising an exception.
166 attribute HTMLElement body
167 setter raises (DOMException);
169 readonly attribute HTMLHeadElement head;
170 readonly attribute HTMLCollection images;
171 readonly attribute HTMLCollection applets;
172 readonly attribute HTMLCollection links;
173 readonly attribute HTMLCollection forms;
174 readonly attribute HTMLCollection anchors;
175 readonly attribute DOMString lastModified;
177 NodeList getElementsByName(in DOMString elementName);
179 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
180 attribute [Custom] Location location;
185 attribute [ConvertNullStringTo=Undefined, ConvertNullToNullString] DOMString charset;
186 readonly attribute [ConvertNullStringTo=Undefined] DOMString defaultCharset;
187 readonly attribute [ConvertNullStringTo=Undefined] DOMString readyState;
189 Element elementFromPoint(in long x, in long y);
190 Range caretRangeFromPoint(in long x, in long y);
192 // Mozilla extensions
193 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
194 DOMSelection getSelection();
196 readonly attribute [ConvertNullStringTo=Null] DOMString characterSet;
200 readonly attribute [ConvertNullStringTo=Null] DOMString preferredStylesheetSet;
201 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString selectedStylesheetSet;
203 #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
204 CSSStyleDeclaration createCSSStyleDeclaration();
207 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
208 // DOM Level 2 Style Interface
209 [OldStyleObjC, UsesView] CSSStyleDeclaration getComputedStyle(in Element element,
210 in DOMString pseudoElement);
213 // FIXME: remove the first version once [Optional] is implemented for Objective-C.
214 [UsesView] CSSRuleList getMatchedCSSRules(in Element element,
215 in DOMString pseudoElement);
216 [UsesView] CSSRuleList getMatchedCSSRules(in Element element,
217 in DOMString pseudoElement,
218 in [Optional] boolean authorOnly);
222 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
223 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
224 [V8Custom] DOMObject getCSSCanvasContext(in DOMString contextId, in DOMString name, in long width, in long height);
229 NodeList getElementsByClassName(in DOMString tagname);
231 readonly attribute DOMString compatMode;
233 // NodeSelector - Selector API
234 [RequiresAllArguments=Raise] Element querySelector(in DOMString selectors)
235 raises(DOMException);
236 [RequiresAllArguments=Raise] NodeList querySelectorAll(in DOMString selectors)
237 raises(DOMException);
239 #if defined(ENABLE_WML) && ENABLE_WML
240 // Only used from within WML layout tests, WML doesn't have JS support at all.
241 [DontEnum] void resetWMLPageState();
242 [DontEnum] void initializeWMLPageState();
245 #if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
246 readonly attribute boolean webkitIsFullScreen;
247 readonly attribute boolean webkitFullScreenKeyboardInputAllowed;
248 readonly attribute Element webkitCurrentFullScreenElement;
249 void webkitCancelFullScreen();
252 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
253 // Event handler DOM attributes
254 attribute [DontEnum] EventListener onabort;
255 attribute [DontEnum] EventListener onblur;
256 attribute [DontEnum] EventListener onchange;
257 attribute [DontEnum] EventListener onclick;
258 attribute [DontEnum] EventListener oncontextmenu;
259 attribute [DontEnum] EventListener ondblclick;
260 attribute [DontEnum] EventListener ondrag;
261 attribute [DontEnum] EventListener ondragend;
262 attribute [DontEnum] EventListener ondragenter;
263 attribute [DontEnum] EventListener ondragleave;
264 attribute [DontEnum] EventListener ondragover;
265 attribute [DontEnum] EventListener ondragstart;
266 attribute [DontEnum] EventListener ondrop;
267 attribute [DontEnum] EventListener onerror;
268 attribute [DontEnum] EventListener onfocus;
269 attribute [DontEnum] EventListener onformchange;
270 attribute [DontEnum] EventListener onforminput;
271 attribute [DontEnum] EventListener oninput;
272 attribute [DontEnum] EventListener oninvalid;
273 attribute [DontEnum] EventListener onkeydown;
274 attribute [DontEnum] EventListener onkeypress;
275 attribute [DontEnum] EventListener onkeyup;
276 attribute [DontEnum] EventListener onload;
277 attribute [DontEnum] EventListener onmousedown;
278 attribute [DontEnum] EventListener onmousemove;
279 attribute [DontEnum] EventListener onmouseout;
280 attribute [DontEnum] EventListener onmouseover;
281 attribute [DontEnum] EventListener onmouseup;
282 attribute [DontEnum] EventListener onmousewheel;
283 attribute [DontEnum] EventListener onreadystatechange;
284 attribute [DontEnum] EventListener onscroll;
285 attribute [DontEnum] EventListener onselect;
286 attribute [DontEnum] EventListener onsubmit;
288 // attribute [DontEnum] EventListener oncanplay;
289 // attribute [DontEnum] EventListener oncanplaythrough;
290 // attribute [DontEnum] EventListener ondurationchange;
291 // attribute [DontEnum] EventListener onemptied;
292 // attribute [DontEnum] EventListener onended;
293 // attribute [DontEnum] EventListener onloadeddata;
294 // attribute [DontEnum] EventListener onloadedmetadata;
295 // attribute [DontEnum] EventListener onloadstart;
296 // attribute [DontEnum] EventListener onpause;
297 // attribute [DontEnum] EventListener onplay;
298 // attribute [DontEnum] EventListener onplaying;
299 // attribute [DontEnum] EventListener onprogress;
300 // attribute [DontEnum] EventListener onratechange;
301 // attribute [DontEnum] EventListener onseeked;
302 // attribute [DontEnum] EventListener onseeking;
303 // attribute [DontEnum] EventListener onshow;
304 // attribute [DontEnum] EventListener onstalled;
305 // attribute [DontEnum] EventListener onsuspend;
306 // attribute [DontEnum] EventListener ontimeupdate;
307 // attribute [DontEnum] EventListener onvolumechange;
308 // attribute [DontEnum] EventListener onwaiting;
311 attribute [DontEnum] EventListener onbeforecut;
312 attribute [DontEnum] EventListener oncut;
313 attribute [DontEnum] EventListener onbeforecopy;
314 attribute [DontEnum] EventListener oncopy;
315 attribute [DontEnum] EventListener onbeforepaste;
316 attribute [DontEnum] EventListener onpaste;
317 attribute [DontEnum] EventListener onreset;
318 attribute [DontEnum] EventListener onsearch;
319 attribute [DontEnum] EventListener onselectstart;
320 attribute [DontEnum] EventListener onselectionchange;
321 attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchstart;
322 attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchmove;
323 attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchend;
324 attribute [DontEnum,Conditional=TOUCH_EVENTS,EnabledAtRuntime] EventListener ontouchcancel;
325 attribute [DontEnum, Conditional=FULLSCREEN_API] EventListener onwebkitfullscreenchange;
328 #if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
329 [ReturnsNew, EnabledAtRuntime] Touch createTouch(in DOMWindow window,
330 in EventTarget target,
336 raises (DOMException);
337 [ReturnsNew, EnabledAtRuntime, Custom] TouchList createTouchList()
338 raises (DOMException);
341 #if defined(LANGUAGE_CPP) && LANGUAGE_CPP
342 // Extra WebCore methods exposed to allow compile-time casting in C++
343 boolean isHTMLDocument();