servo: Merge #11587 - Cleanup Element interface (from nox:element); r=Ms2ger
authorAnthony Ramine <n.oxyde@gmail.com>
Sun, 05 Jun 2016 20:29:19 -0500
changeset 339022 b773a1c1565ca7c722c876141c6b6c4fb4012395
parent 339021 c310b4d5c4557e78dabbfc715b489d33ca87d50a
child 339023 020f1fc38e5423fa5638db39cd0a7cb1d931efd7
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
servo: Merge #11587 - Cleanup Element interface (from nox:element); r=Ms2ger Source-Repo: https://github.com/servo/servo Source-Revision: 2083a8c1c49dce46b71d8e40c089809d98f10143
servo/components/script/dom/webidls/Element.webidl
--- a/servo/components/script/dom/webidls/Element.webidl
+++ b/servo/components/script/dom/webidls/Element.webidl
@@ -25,59 +25,59 @@ interface Element : Node {
 
   [Pure]
            attribute DOMString id;
   [Pure]
            attribute DOMString className;
   [SameObject, PutForwards=value]
   readonly attribute DOMTokenList classList;
 
+  [Pure]
+  boolean hasAttributes();
   [SameObject]
   readonly attribute NamedNodeMap attributes;
   [Pure]
   sequence<DOMString> getAttributeNames();
   [Pure]
-  boolean hasAttributes();
-  [Pure]
   DOMString? getAttribute(DOMString name);
   [Pure]
   DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
-  [Pure]
-  Attr? getAttributeNode(DOMString name);
-  [Pure]
-  Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
   [Throws]
   void setAttribute(DOMString name, DOMString value);
   [Throws]
   void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
   void removeAttribute(DOMString name);
   void removeAttributeNS(DOMString? namespace, DOMString localName);
-  [Throws]
-  Attr removeAttributeNode(Attr oldAttr);
   boolean hasAttribute(DOMString name);
   boolean hasAttributeNS(DOMString? namespace, DOMString localName);
 
+  [Pure]
+  Attr? getAttributeNode(DOMString name);
+  [Pure]
+  Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
   [Throws]
   Attr? setAttributeNode(Attr attr);
   [Throws]
   Attr? setAttributeNodeNS(Attr attr);
+  [Throws]
+  Attr removeAttributeNode(Attr oldAttr);
 
   [Pure, Throws]
   Element? closest(DOMString selectors);
-
   [Pure, Throws]
   boolean matches(DOMString selectors);
   [Pure, Throws]
-  boolean webkitMatchesSelector(DOMString selectors);
+  boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches
 
   HTMLCollection getElementsByTagName(DOMString localName);
   HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
   HTMLCollection getElementsByClassName(DOMString classNames);
+
   [Throws]
-  Element? insertAdjacentElement(DOMString where_, Element element);
+  Element? insertAdjacentElement(DOMString where_, Element element); // historical
   [Throws]
   void insertAdjacentText(DOMString where_, DOMString data);
 };
 
 // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-element-interface
 partial interface Element {
   DOMRectList getClientRects();
   DOMRect getBoundingClientRect();