| /* |
| * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
| * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| * |
| * This library is free software; you can redistribute it and/or |
| * modify it under the terms of the GNU Library General Public |
| * License as published by the Free Software Foundation; either |
| * version 2 of the License, or (at your option) any later version. |
| * |
| * This library is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| * Library General Public License for more details. |
| * |
| * You should have received a copy of the GNU Library General Public License |
| * along with this library; see the file COPYING.LIB. If not, write to |
| * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| * Boston, MA 02110-1301, USA. |
| */ |
| |
| [ |
| CustomToJSObject, |
| SkipVTableValidation |
| ] interface Element : Node { |
| |
| // DOM Level 1 Core |
| |
| [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMString tagName; |
| |
| [TreatReturnedNullStringAs=Null] DOMString getAttribute([Optional=DefaultIsUndefined] DOMString name); |
| [RaisesException] void setAttribute([Optional=DefaultIsUndefined] DOMString name, |
| [Optional=DefaultIsUndefined] DOMString value); |
| void removeAttribute([Optional=DefaultIsUndefined] DOMString name); |
| Attr getAttributeNode([Optional=DefaultIsUndefined] DOMString name); |
| [RaisesException] Attr setAttributeNode([Optional=DefaultIsUndefined] Attr newAttr); |
| [RaisesException] Attr removeAttributeNode([Optional=DefaultIsUndefined] Attr oldAttr); |
| [PerWorldBindings] NodeList getElementsByTagName([Optional=DefaultIsUndefined] DOMString name); |
| |
| // For ObjC this is defined on Node for legacy support. |
| [PerWorldBindings] readonly attribute NamedNodeMap attributes; |
| boolean hasAttributes(); |
| |
| // DOM Level 2 Core |
| |
| DOMString getAttributeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI, |
| [Optional=DefaultIsUndefined] DOMString localName); |
| [RaisesException] void setAttributeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI, |
| [Optional=DefaultIsUndefined] DOMString qualifiedName, |
| [Optional=DefaultIsUndefined] DOMString value); |
| void removeAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, |
| DOMString localName); |
| NodeList getElementsByTagNameNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI, |
| [Optional=DefaultIsUndefined] DOMString localName); |
| Attr getAttributeNodeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI, |
| [Optional=DefaultIsUndefined] DOMString localName); |
| [RaisesException] Attr setAttributeNodeNS([Optional=DefaultIsUndefined] Attr newAttr); |
| boolean hasAttribute(DOMString name); |
| boolean hasAttributeNS([TreatNullAs=NullString,Optional=DefaultIsUndefined] DOMString namespaceURI, |
| [Optional=DefaultIsUndefined] DOMString localName); |
| |
| [PerWorldBindings] readonly attribute CSSStyleDeclaration style; |
| |
| // Common extensions |
| |
| [PerWorldBindings] readonly attribute long offsetLeft; |
| [PerWorldBindings] readonly attribute long offsetTop; |
| [PerWorldBindings] readonly attribute long offsetWidth; |
| [PerWorldBindings] readonly attribute long offsetHeight; |
| [ImplementedAs=bindingsOffsetParent, PerWorldBindings] readonly attribute Element offsetParent; |
| [PerWorldBindings] readonly attribute long clientLeft; |
| [PerWorldBindings] readonly attribute long clientTop; |
| [PerWorldBindings] readonly attribute long clientWidth; |
| [PerWorldBindings] readonly attribute long clientHeight; |
| [PerWorldBindings] attribute long scrollLeft; |
| [PerWorldBindings] attribute long scrollTop; |
| [PerWorldBindings] readonly attribute long scrollWidth; |
| [PerWorldBindings] readonly attribute long scrollHeight; |
| |
| void focus(); |
| void blur(); |
| void scrollIntoView([Optional] boolean alignWithTop); |
| |
| // WebKit extensions |
| |
| void scrollIntoViewIfNeeded([Optional] boolean centerIfNeeded); |
| void scrollByLines([Optional=DefaultIsUndefined] long lines); |
| void scrollByPages([Optional=DefaultIsUndefined] long pages); |
| |
| // HTML 5 |
| NodeList getElementsByClassName([Optional=DefaultIsUndefined] DOMString name); |
| |
| [Reflect=class, PerWorldBindings] attribute DOMString className; |
| [PerWorldBindings] readonly attribute DOMTokenList classList; |
| |
| [PerWorldBindings] readonly attribute DOMStringMap dataset; |
| |
| // NodeSelector - Selector API |
| [RaisesException] Element querySelector(DOMString selectors); |
| [RaisesException] NodeList querySelectorAll(DOMString selectors); |
| |
| // WebKit extension, pending specification. |
| [RaisesException] boolean webkitMatchesSelector([Optional=DefaultIsUndefined] DOMString selectors); |
| |
| // ElementTraversal API |
| [PerWorldBindings] readonly attribute Element firstElementChild; |
| [PerWorldBindings] readonly attribute Element lastElementChild; |
| [PerWorldBindings] readonly attribute Element previousElementSibling; |
| [PerWorldBindings] readonly attribute Element nextElementSibling; |
| [PerWorldBindings] readonly attribute unsigned long childElementCount; |
| |
| // ShadowAware API |
| [Reflect=pseudo, EnabledAtRuntime=shadowDOM, ImplementedAs=pseudo, PerWorldBindings] attribute DOMString webkitPseudo; |
| [EnabledAtRuntime=shadowDOM, ImplementedAs=createShadowRoot, RaisesException] ShadowRoot webkitCreateShadowRoot(); |
| [EnabledAtRuntime=shadowDOM, ImplementedAs=shadowRoot, PerWorldBindings] readonly attribute ShadowRoot webkitShadowRoot; |
| [EnabledAtRuntime=shadowDOM, ImplementedAs=insertionParentForBinding, PerWorldBindings] readonly attribute Node webkitInsertionParent; |
| |
| // DOM 4 |
| [RaisesException] void remove(); |
| |
| // CSSOM View Module API |
| ClientRectList getClientRects(); |
| ClientRect getBoundingClientRect(); |
| |
| // Mozilla version |
| const unsigned short ALLOW_KEYBOARD_INPUT = 1; |
| [EnabledAtRuntime] void webkitRequestFullScreen([Optional=DefaultIsUndefined] unsigned short flags); |
| |
| // W3C version |
| [EnabledAtRuntime] void webkitRequestFullscreen(); |
| |
| void webkitRequestPointerLock(); |
| |
| // CSS Regions API |
| [Conditional=CSS_REGIONS, EnabledAtRuntime=cssRegions, PerWorldBindings] readonly attribute DOMString webkitRegionOverset; |
| [Conditional=CSS_REGIONS, EnabledAtRuntime=cssRegions] sequence<Range> webkitGetRegionFlowRanges(); |
| |
| // Event handler DOM attributes |
| [NotEnumerable, PerWorldBindings] attribute EventListener onabort; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onblur; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onchange; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onclick; |
| [NotEnumerable, PerWorldBindings] attribute EventListener oncontextmenu; |
| [NotEnumerable, PerWorldBindings] attribute EventListener ondblclick; |
| [NotEnumerable, PerWorldBindings] attribute EventListener ondrag; |
| [NotEnumerable, PerWorldBindings] attribute EventListener ondragend; |
| [NotEnumerable, PerWorldBindings] attribute EventListener ondragenter; |
| [NotEnumerable, PerWorldBindings] attribute EventListener ondragleave; |
| [NotEnumerable, PerWorldBindings] attribute EventListener ondragover; |
| [NotEnumerable, PerWorldBindings] attribute EventListener ondragstart; |
| [NotEnumerable, PerWorldBindings] attribute EventListener ondrop; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onerror; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onfocus; |
| [NotEnumerable, PerWorldBindings] attribute EventListener oninput; |
| [NotEnumerable, PerWorldBindings] attribute EventListener oninvalid; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onkeydown; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onkeypress; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onkeyup; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onload; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onmousedown; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onmousemove; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onmouseout; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onmouseover; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onmouseup; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onmousewheel; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onscroll; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onselect; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onsubmit; |
| |
| // attribute [NotEnumerable] EventListener oncanplay; |
| // attribute [NotEnumerable] EventListener oncanplaythrough; |
| // attribute [NotEnumerable] EventListener ondurationchange; |
| // attribute [NotEnumerable] EventListener onemptied; |
| // attribute [NotEnumerable] EventListener onended; |
| // attribute [NotEnumerable] EventListener onloadeddata; |
| // attribute [NotEnumerable] EventListener onloadedmetadata; |
| // attribute [NotEnumerable] EventListener onloadstart; |
| // attribute [NotEnumerable] EventListener onpause; |
| // attribute [NotEnumerable] EventListener onplay; |
| // attribute [NotEnumerable] EventListener onplaying; |
| // attribute [NotEnumerable] EventListener onprogress; |
| // attribute [NotEnumerable] EventListener onratechange; |
| // attribute [NotEnumerable] EventListener onreadystatechange; |
| // attribute [NotEnumerable] EventListener onseeked; |
| // attribute [NotEnumerable] EventListener onseeking; |
| // attribute [NotEnumerable] EventListener onshow; |
| // attribute [NotEnumerable] EventListener onstalled; |
| // attribute [NotEnumerable] EventListener onsuspend; |
| // attribute [NotEnumerable] EventListener ontimeupdate; |
| // attribute [NotEnumerable] EventListener onvolumechange; |
| // attribute [NotEnumerable] EventListener onwaiting; |
| |
| // WebKit extensions |
| [NotEnumerable, PerWorldBindings] attribute EventListener onbeforecut; |
| [NotEnumerable, PerWorldBindings] attribute EventListener oncut; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onbeforecopy; |
| [NotEnumerable, PerWorldBindings] attribute EventListener oncopy; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onbeforepaste; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onpaste; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onreset; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onsearch; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onselectstart; |
| [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchstart; |
| [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchmove; |
| [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchend; |
| [NotEnumerable,Conditional=TOUCH_EVENTS,EnabledAtRuntime=touch, PerWorldBindings] attribute EventListener ontouchcancel; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onwebkitfullscreenchange; |
| [NotEnumerable, PerWorldBindings] attribute EventListener onwebkitfullscreenerror; |
| }; |
| |