Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| 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 [ | 21 [ |
| 22 SpecialWrapFor=HTMLElement|SVGElement | 22 SpecialWrapFor=HTMLElement|SVGElement |
| 23 ] interface Element : Node { | 23 ] interface Element : Node { |
| 24 | 24 |
| 25 // DOM Level 1 Core | 25 // DOM Level 1 Core |
| 26 | 26 |
| 27 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr ing tagName; | 27 [TreatReturnedNullStringAs=Null] readonly attribute DOMString tagName; |
| 28 | 28 |
| 29 [TreatReturnedNullStringAs=Null] DOMString getAttribute(DOMString name); | 29 [TreatReturnedNullStringAs=Null] DOMString getAttribute(DOMString name); |
| 30 [RaisesException, CustomElementCallbacks] void setAttribute(DOMString name, DOMString value); | 30 [RaisesException, CustomElementCallbacks] void setAttribute(DOMString name, DOMString value); |
| 31 [CustomElementCallbacks] void removeAttribute(DOMString name); | 31 [CustomElementCallbacks] void removeAttribute(DOMString name); |
| 32 [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined ] optional DOMString name); // Removed from DOM4. | 32 [MeasureAs=ElementGetAttributeNode] Attr getAttributeNode([Default=Undefined ] optional DOMString name); // Removed from DOM4. |
| 33 [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode] Attr setAttributeNode([Default=Undefined, TypeChecking=Nullable] optional Attr newAttr); // Removed from DOM4. | 33 [RaisesException, CustomElementCallbacks, MeasureAs=ElementSetAttributeNode] Attr setAttributeNode([Default=Undefined, TypeChecking=Nullable] optional Attr newAttr); // Removed from DOM4. |
| 34 [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNo de] Attr removeAttributeNode([Default=Undefined, TypeChecking=Nullable] optional Attr oldAttr); // Removed from DOM4. | 34 [RaisesException, CustomElementCallbacks, MeasureAs=ElementRemoveAttributeNo de] Attr removeAttributeNode([Default=Undefined, TypeChecking=Nullable] optional Attr oldAttr); // Removed from DOM4. |
| 35 [PerWorldBindings] HTMLCollection getElementsByTagName(DOMString name); | 35 [PerWorldBindings] HTMLCollection getElementsByTagName(DOMString name); |
| 36 | 36 |
| 37 [PerWorldBindings] readonly attribute NamedNodeMap attributes; | 37 [PerWorldBindings] readonly attribute NamedNodeMap attributes; |
| 38 [MeasureAs=HasAttributes] boolean hasAttributes(); | 38 [MeasureAs=HasAttributes] boolean hasAttributes(); |
| 39 | 39 |
| 40 // DOM Level 2 Core | 40 // DOM Level 2 Core |
| 41 | 41 |
| 42 [TreatReturnedNullStringAs=Null] DOMString getAttributeNS([TreatNullAs=NullS tring] DOMString namespaceURI, DOMString localName); | 42 [TreatReturnedNullStringAs=Null] DOMString getAttributeNS([TreatNullAs=NullS tring] DOMString namespaceURI, DOMString localName); |
| 43 [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=N ullString] DOMString namespaceURI, DOMString qualifiedName, DOMString value); | 43 [RaisesException, CustomElementCallbacks] void setAttributeNS([TreatNullAs=N ullString] DOMString namespaceURI, DOMString qualifiedName, DOMString value); |
| 44 [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DOM String namespaceURI, DOMString localName); | 44 [CustomElementCallbacks] void removeAttributeNS([TreatNullAs=NullString] DOM String namespaceURI, DOMString localName); |
| 45 HTMLCollection getElementsByTagNameNS([TreatNullAs=NullString] DOMString nam espaceURI, DOMString localName); | 45 HTMLCollection getElementsByTagNameNS([TreatNullAs=NullString] DOMString nam espaceURI, DOMString localName); |
| 46 [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=N ullString, Default=Undefined] optional DOMString namespaceURI, | 46 [MeasureAs=ElementGetAttributeNodeNS] Attr getAttributeNodeNS([TreatNullAs=N ullString, Default=Undefined] optional DOMString namespaceURI, |
| 47 [Default=Undef ined] optional DOMString localName); // Removed from DOM4. | 47 [Default=Undef ined] optional DOMString localName); // Removed from DOM4. |
| 48 [RaisesException, CustomElementCallbacks, DeprecateAs=ElementSetAttributeNod eNS] Attr setAttributeNodeNS([Default=Undefined, TypeChecking=Nullable] optional Attr newAttr); // Removed from DOM4. | 48 [RaisesException, CustomElementCallbacks, DeprecateAs=ElementSetAttributeNod eNS] Attr setAttributeNodeNS([Default=Undefined, TypeChecking=Nullable] optional Attr newAttr); // Removed from DOM4. |
| 49 boolean hasAttribute(DOMString name); | 49 boolean hasAttribute(DOMString name); |
| 50 boolean hasAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DOMS tring localName); | 50 boolean hasAttributeNS([TreatNullAs=NullString] DOMString namespaceURI, DOMS tring localName); |
| 51 | 51 |
| 52 [PerWorldBindings] readonly attribute CSSStyleDeclaration style; | 52 [PerWorldBindings] readonly attribute CSSStyleDeclaration style; |
| 53 | 53 |
| 54 // DOM4 | 54 // DOM4 |
| 55 [Reflect, PerWorldBindings] attribute DOMString id; | 55 [Reflect] attribute DOMString id; |
| 56 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr ing namespaceURI; | 56 [TreatReturnedNullStringAs=Null] readonly attribute DOMString namespaceURI; |
| 57 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, PerWorldBindings, R aisesException=Setter] attribute DOMString prefix; | 57 [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, RaisesException=Set ter] attribute DOMString prefix; |
| 58 [TreatReturnedNullStringAs=Null, PerWorldBindings] readonly attribute DOMStr ing localName; | 58 [TreatReturnedNullStringAs=Null] readonly attribute DOMString localName; |
| 59 | 59 |
| 60 [RaisesException] boolean matches(DOMString selectors); | 60 [RaisesException] boolean matches(DOMString selectors); |
| 61 | 61 |
| 62 // Common extensions | 62 // Common extensions |
| 63 | 63 |
| 64 [PerWorldBindings] readonly attribute long offsetLeft; | 64 readonly attribute long offsetLeft; |
| 65 [PerWorldBindings] readonly attribute long offsetTop; | 65 readonly attribute long offsetTop; |
| 66 [PerWorldBindings] readonly attribute long offsetWidth; | 66 readonly attribute long offsetWidth; |
| 67 [PerWorldBindings] readonly attribute long offsetHeight; | 67 readonly attribute long offsetHeight; |
| 68 [ImplementedAs=offsetParentForBindings, PerWorldBindings] readonly attribute Element offsetParent; | 68 [ImplementedAs=offsetParentForBindings, PerWorldBindings] readonly attribute Element offsetParent; |
| 69 [PerWorldBindings] readonly attribute long clientLeft; | 69 readonly attribute long clientLeft; |
| 70 [PerWorldBindings] readonly attribute long clientTop; | 70 readonly attribute long clientTop; |
| 71 [PerWorldBindings] readonly attribute long clientWidth; | 71 readonly attribute long clientWidth; |
| 72 [PerWorldBindings] readonly attribute long clientHeight; | 72 readonly attribute long clientHeight; |
| 73 | 73 |
| 74 // FIXME: should be: | 74 // FIXME: should be: |
| 75 // [PerWorldBindings] attribute (Dictionary or long) scrollLeft; | 75 // [PerWorldBindings] attribute (Dictionary or long) scrollLeft; |
|
marja
2014/04/30 11:11:09
Remove from the comment too
Inactive
2014/04/30 12:19:04
Done.
| |
| 76 // [PerWorldBindings] attribute (Dictionary or long) scrollTop; | 76 // [PerWorldBindings] attribute (Dictionary or long) scrollTop; |
| 77 // http://crbug.com/240176 | 77 // http://crbug.com/240176 |
| 78 [PerWorldBindings, Custom=Setter] attribute long scrollLeft; | 78 [Custom=Setter] attribute long scrollLeft; |
| 79 [PerWorldBindings, Custom=Setter] attribute long scrollTop; | 79 [Custom=Setter] attribute long scrollTop; |
| 80 [PerWorldBindings] readonly attribute long scrollWidth; | 80 readonly attribute long scrollWidth; |
| 81 [PerWorldBindings] readonly attribute long scrollHeight; | 81 readonly attribute long scrollHeight; |
| 82 | 82 |
| 83 void focus(); | 83 void focus(); |
| 84 void blur(); | 84 void blur(); |
| 85 void scrollIntoView(optional boolean alignWithTop); | 85 void scrollIntoView(optional boolean alignWithTop); |
| 86 | 86 |
| 87 // WebKit extensions | 87 // WebKit extensions |
| 88 | 88 |
| 89 void scrollIntoViewIfNeeded(optional boolean centerIfNeeded); | 89 void scrollIntoViewIfNeeded(optional boolean centerIfNeeded); |
| 90 void scrollByLines([Default=Undefined] optional long lines); | 90 void scrollByLines([Default=Undefined] optional long lines); |
| 91 void scrollByPages([Default=Undefined] optional long pages); | 91 void scrollByPages([Default=Undefined] optional long pages); |
| 92 | 92 |
| 93 // HTML 5 | 93 // HTML 5 |
| 94 HTMLCollection getElementsByClassName(DOMString classNames); | 94 HTMLCollection getElementsByClassName(DOMString classNames); |
| 95 [TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, LogActivi ty=SetterOnly, RaisesException=Setter] attribute DOMString innerHTML; | 95 [TreatNullAs=NullString, CustomElementCallbacks, PerWorldBindings, LogActivi ty=SetterOnly, RaisesException=Setter] attribute DOMString innerHTML; |
| 96 [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] att ribute DOMString outerHTML; | 96 [TreatNullAs=NullString, CustomElementCallbacks, RaisesException=Setter] att ribute DOMString outerHTML; |
| 97 | 97 |
| 98 [RaisesException, CustomElementCallbacks, MeasureAs=InsertAdjacentElement] E lement insertAdjacentElement(DOMString where, Element element); | 98 [RaisesException, CustomElementCallbacks, MeasureAs=InsertAdjacentElement] E lement insertAdjacentElement(DOMString where, Element element); |
| 99 [RaisesException, MeasureAs=InsertAdjacentText] void insertAdjacentText(DOMS tring where, DOMString text); | 99 [RaisesException, MeasureAs=InsertAdjacentText] void insertAdjacentText(DOMS tring where, DOMString text); |
| 100 [CustomElementCallbacks, RaisesException, MeasureAs=InsertAdjacentHTML] void insertAdjacentHTML(DOMString where, DOMString html); | 100 [CustomElementCallbacks, RaisesException, MeasureAs=InsertAdjacentHTML] void insertAdjacentHTML(DOMString where, DOMString html); |
| 101 | 101 |
| 102 [Reflect=class, PerWorldBindings] attribute DOMString className; | 102 [Reflect=class] attribute DOMString className; |
| 103 [PerWorldBindings] readonly attribute DOMTokenList classList; | 103 [PerWorldBindings] readonly attribute DOMTokenList classList; |
| 104 | 104 |
| 105 [PerWorldBindings] readonly attribute DOMStringMap dataset; | 105 [PerWorldBindings] readonly attribute DOMStringMap dataset; |
| 106 | 106 |
| 107 // WebKit extension | 107 // WebKit extension |
| 108 [RaisesException, ImplementedAs=matches, MeasureAs=ElementPrefixedMatchesSel ector] boolean webkitMatchesSelector(DOMString selectors); | 108 [RaisesException, ImplementedAs=matches, MeasureAs=ElementPrefixedMatchesSel ector] boolean webkitMatchesSelector(DOMString selectors); |
| 109 | 109 |
| 110 // Shadow DOM API | 110 // Shadow DOM API |
| 111 [RaisesException] ShadowRoot createShadowRoot(); | 111 [RaisesException] ShadowRoot createShadowRoot(); |
| 112 [PerWorldBindings] readonly attribute ShadowRoot shadowRoot; | 112 [PerWorldBindings] readonly attribute ShadowRoot shadowRoot; |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 138 [RuntimeEnabled=Touch] attribute EventHandler ontouchend; | 138 [RuntimeEnabled=Touch] attribute EventHandler ontouchend; |
| 139 [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; | 139 [RuntimeEnabled=Touch] attribute EventHandler ontouchmove; |
| 140 [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; | 140 [RuntimeEnabled=Touch] attribute EventHandler ontouchstart; |
| 141 attribute EventHandler onwebkitfullscreenchange; | 141 attribute EventHandler onwebkitfullscreenchange; |
| 142 attribute EventHandler onwebkitfullscreenerror; | 142 attribute EventHandler onwebkitfullscreenerror; |
| 143 [PerWorldBindings, LogActivity=SetterOnly] attribute EventHandler onwheel; | 143 [PerWorldBindings, LogActivity=SetterOnly] attribute EventHandler onwheel; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 Element implements ParentNode; | 146 Element implements ParentNode; |
| 147 Element implements ChildNode; | 147 Element implements ChildNode; |
| OLD | NEW |