darin | 8d1badc | 2006-03-06 16:50:13 +0000 | [diff] [blame] | 1 | /* |
weinig | 3843e43 | 2007-06-07 04:28:36 +0000 | [diff] [blame] | 2 | * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
weinig | a8192c0 | 2006-08-28 03:33:34 +0000 | [diff] [blame] | 3 | * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
darin | 8d1badc | 2006-03-06 16:50:13 +0000 | [diff] [blame] | 4 | * |
| 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. |
| 9 | * |
| 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. |
| 14 | * |
| 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 |
ddkilzer | c8eccec | 2007-09-26 02:29:57 +0000 | [diff] [blame] | 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 | * Boston, MA 02110-1301, USA. |
darin | 8d1badc | 2006-03-06 16:50:13 +0000 | [diff] [blame] | 19 | */ |
| 20 | |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 21 | module core { |
mjs | 0497311 | 2006-02-24 07:16:15 +0000 | [diff] [blame] | 22 | |
weinig | b2ec73c | 2007-10-31 01:02:47 +0000 | [diff] [blame^] | 23 | interface [ |
| 24 | GenerateConstructor, |
| 25 | GenerateNativeConverter, |
| 26 | InterfaceUUID=FEFE9C21-E58C-4b5b-821A-61A514613763, |
| 27 | ImplementationUUID=12E5B08E-A680-4baf-9D1E-108AEF7ABBFB |
| 28 | ] Element : EventTargetNode { |
darin | 8d1badc | 2006-03-06 16:50:13 +0000 | [diff] [blame] | 29 | |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 30 | // DOM Level 1 Core |
darin | 248fb4b | 2006-03-14 22:58:25 +0000 | [diff] [blame] | 31 | |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 32 | readonly attribute [ConvertNullStringTo=Null] DOMString tagName; |
darin | 8d1badc | 2006-03-06 16:50:13 +0000 | [diff] [blame] | 33 | |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 34 | [ConvertNullStringTo=Null] DOMString getAttribute(in DOMString name); |
weinig | 63192cb | 2007-08-10 18:10:42 +0000 | [diff] [blame] | 35 | [OldStyleObjC, Custom] void setAttribute(in DOMString name, |
| 36 | in DOMString value) |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 37 | raises(DOMException); |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 38 | void removeAttribute(in DOMString name) |
darin | 942dc76 | 2006-03-16 09:28:01 +0000 | [diff] [blame] | 39 | raises(DOMException); |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 40 | Attr getAttributeNode(in DOMString name); |
weinig | 63192cb | 2007-08-10 18:10:42 +0000 | [diff] [blame] | 41 | [Custom] Attr setAttributeNode(in Attr newAttr) |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 42 | raises(DOMException); |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 43 | Attr removeAttributeNode(in Attr oldAttr) |
darin | 942dc76 | 2006-03-16 09:28:01 +0000 | [diff] [blame] | 44 | raises(DOMException); |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 45 | NodeList getElementsByTagName(in DOMString name); |
darin | 248fb4b | 2006-03-14 22:58:25 +0000 | [diff] [blame] | 46 | |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 47 | // DOM Level 2 Core |
darin | 8d1badc | 2006-03-06 16:50:13 +0000 | [diff] [blame] | 48 | |
thatcher | 12854cc | 2006-09-03 20:38:00 +0000 | [diff] [blame] | 49 | [OldStyleObjC] DOMString getAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI, |
weinig | 100b4c6 | 2006-09-11 17:11:59 +0000 | [diff] [blame] | 50 | in DOMString localName); |
weinig | 63192cb | 2007-08-10 18:10:42 +0000 | [diff] [blame] | 51 | [OldStyleObjC, Custom] void setAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI, |
| 52 | in DOMString qualifiedName, |
| 53 | in DOMString value) |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 54 | raises(DOMException); |
thatcher | 12854cc | 2006-09-03 20:38:00 +0000 | [diff] [blame] | 55 | [OldStyleObjC] void removeAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI, |
weinig | 100b4c6 | 2006-09-11 17:11:59 +0000 | [diff] [blame] | 56 | in DOMString localName) |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 57 | raises(DOMException); |
thatcher | 12854cc | 2006-09-03 20:38:00 +0000 | [diff] [blame] | 58 | [OldStyleObjC] NodeList getElementsByTagNameNS(in [ConvertNullToNullString] DOMString namespaceURI, |
weinig | 100b4c6 | 2006-09-11 17:11:59 +0000 | [diff] [blame] | 59 | in DOMString localName); |
thatcher | 12854cc | 2006-09-03 20:38:00 +0000 | [diff] [blame] | 60 | [OldStyleObjC] Attr getAttributeNodeNS(in [ConvertNullToNullString] DOMString namespaceURI, |
weinig | 100b4c6 | 2006-09-11 17:11:59 +0000 | [diff] [blame] | 61 | in DOMString localName); |
weinig | 63192cb | 2007-08-10 18:10:42 +0000 | [diff] [blame] | 62 | [Custom] Attr setAttributeNodeNS(in Attr newAttr) |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 63 | raises(DOMException); |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 64 | boolean hasAttribute(in DOMString name); |
thatcher | 12854cc | 2006-09-03 20:38:00 +0000 | [diff] [blame] | 65 | [OldStyleObjC] boolean hasAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI, |
weinig | 100b4c6 | 2006-09-11 17:11:59 +0000 | [diff] [blame] | 66 | in DOMString localName); |
darin | 8d1badc | 2006-03-06 16:50:13 +0000 | [diff] [blame] | 67 | |
weinig | b2ec73c | 2007-10-31 01:02:47 +0000 | [diff] [blame^] | 68 | #if !defined(LANGUAGE_COM) |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 69 | readonly attribute CSSStyleDeclaration style; |
weinig | b2ec73c | 2007-10-31 01:02:47 +0000 | [diff] [blame^] | 70 | #endif |
darin | 8d1badc | 2006-03-06 16:50:13 +0000 | [diff] [blame] | 71 | |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 72 | // Common extensions |
| 73 | |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 74 | readonly attribute long offsetLeft; |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 75 | readonly attribute long offsetTop; |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 76 | readonly attribute long offsetWidth; |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 77 | readonly attribute long offsetHeight; |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 78 | readonly attribute Element offsetParent; |
hyatt | b0aa815 | 2006-09-10 04:55:03 +0000 | [diff] [blame] | 79 | readonly attribute long clientLeft; |
hyatt | b0aa815 | 2006-09-10 04:55:03 +0000 | [diff] [blame] | 80 | readonly attribute long clientTop; |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 81 | readonly attribute long clientWidth; |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 82 | readonly attribute long clientHeight; |
weinig | 100b4c6 | 2006-09-11 17:11:59 +0000 | [diff] [blame] | 83 | attribute long scrollLeft; |
| 84 | attribute long scrollTop; |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 85 | readonly attribute long scrollWidth; |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 86 | readonly attribute long scrollHeight; |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 87 | |
| 88 | void focus(); |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 89 | void blur(); |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 90 | void scrollIntoView(in [Optional] boolean alignWithTop); |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 91 | |
| 92 | // IE extensions |
darin | 8c3ba96 | 2006-03-31 18:51:40 +0000 | [diff] [blame] | 93 | |
thatcher | 7da1ad9 | 2006-09-05 02:45:57 +0000 | [diff] [blame] | 94 | Node insertAdjacentElement(in DOMString position, |
| 95 | in Node element) |
mjs | a55d5ec | 2006-03-29 09:38:54 +0000 | [diff] [blame] | 96 | raises(DOMException); |
thatcher | 7da1ad9 | 2006-09-05 02:45:57 +0000 | [diff] [blame] | 97 | boolean contains(in Element element); |
darin | 8c3ba96 | 2006-03-31 18:51:40 +0000 | [diff] [blame] | 98 | |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 99 | // WebKit extensions |
| 100 | |
darin | 527e3c4 | 2006-08-31 00:20:18 +0000 | [diff] [blame] | 101 | void scrollIntoViewIfNeeded(in [Optional] boolean centerIfNeeded); |
thatcher | 7da1ad9 | 2006-09-05 02:45:57 +0000 | [diff] [blame] | 102 | void scrollByLines(in long lines); |
thatcher | 7da1ad9 | 2006-09-05 02:45:57 +0000 | [diff] [blame] | 103 | void scrollByPages(in long pages); |
mjs | 74dd822 | 2006-04-07 08:31:17 +0000 | [diff] [blame] | 104 | |
rwlbuis | 60bf7509 | 2006-12-10 18:16:47 +0000 | [diff] [blame] | 105 | #if defined(LANGUAGE_OBJECTIVE_C) |
| 106 | // Objective-C extensions |
| 107 | readonly attribute DOMString innerText; |
| 108 | #endif /* defined(LANGUAGE_OBJECTIVE_C) */ |
| 109 | |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 110 | }; |
mjs | 0497311 | 2006-02-24 07:16:15 +0000 | [diff] [blame] | 111 | |
andersca | 3bd28d1 | 2006-02-08 11:48:10 +0000 | [diff] [blame] | 112 | } |