Auto merge of #11587 - nox:element, r=Ms2ger

Cleanup Element interface

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11587)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-05 20:29:19 -05:00
commit 2083a8c1c4

View file

@ -30,49 +30,49 @@ interface Element : Node {
[SameObject, PutForwards=value] [SameObject, PutForwards=value]
readonly attribute DOMTokenList classList; readonly attribute DOMTokenList classList;
[Pure]
boolean hasAttributes();
[SameObject] [SameObject]
readonly attribute NamedNodeMap attributes; readonly attribute NamedNodeMap attributes;
[Pure] [Pure]
sequence<DOMString> getAttributeNames(); sequence<DOMString> getAttributeNames();
[Pure] [Pure]
boolean hasAttributes();
[Pure]
DOMString? getAttribute(DOMString name); DOMString? getAttribute(DOMString name);
[Pure] [Pure]
DOMString? getAttributeNS(DOMString? namespace, DOMString localName); DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
[Pure]
Attr? getAttributeNode(DOMString name);
[Pure]
Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
[Throws] [Throws]
void setAttribute(DOMString name, DOMString value); void setAttribute(DOMString name, DOMString value);
[Throws] [Throws]
void setAttributeNS(DOMString? namespace, DOMString name, DOMString value); void setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
void removeAttribute(DOMString name); void removeAttribute(DOMString name);
void removeAttributeNS(DOMString? namespace, DOMString localName); void removeAttributeNS(DOMString? namespace, DOMString localName);
[Throws]
Attr removeAttributeNode(Attr oldAttr);
boolean hasAttribute(DOMString name); boolean hasAttribute(DOMString name);
boolean hasAttributeNS(DOMString? namespace, DOMString localName); boolean hasAttributeNS(DOMString? namespace, DOMString localName);
[Pure]
Attr? getAttributeNode(DOMString name);
[Pure]
Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName);
[Throws] [Throws]
Attr? setAttributeNode(Attr attr); Attr? setAttributeNode(Attr attr);
[Throws] [Throws]
Attr? setAttributeNodeNS(Attr attr); Attr? setAttributeNodeNS(Attr attr);
[Throws]
Attr removeAttributeNode(Attr oldAttr);
[Pure, Throws] [Pure, Throws]
Element? closest(DOMString selectors); Element? closest(DOMString selectors);
[Pure, Throws] [Pure, Throws]
boolean matches(DOMString selectors); boolean matches(DOMString selectors);
[Pure, Throws] [Pure, Throws]
boolean webkitMatchesSelector(DOMString selectors); boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches
HTMLCollection getElementsByTagName(DOMString localName); HTMLCollection getElementsByTagName(DOMString localName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName); HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames); HTMLCollection getElementsByClassName(DOMString classNames);
[Throws] [Throws]
Element? insertAdjacentElement(DOMString where_, Element element); Element? insertAdjacentElement(DOMString where_, Element element); // historical
[Throws] [Throws]
void insertAdjacentText(DOMString where_, DOMString data); void insertAdjacentText(DOMString where_, DOMString data);
}; };