aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls/Element.webidl
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-09-11 02:51:51 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-09-19 16:03:13 +0200
commit49219baab8fa67baba2383d50b0a4da84b2b9068 (patch)
tree1226a7ed6734089f7d133e943446120c2e5c2037 /components/script/dom/webidls/Element.webidl
parent4dbf391e837652d8a509224e3a07f65d923fb9c2 (diff)
downloadservo-49219baab8fa67baba2383d50b0a4da84b2b9068.tar.gz
servo-49219baab8fa67baba2383d50b0a4da84b2b9068.zip
Annotate many DOM attribute and methods with [Constant] and [Pure]
Diffstat (limited to 'components/script/dom/webidls/Element.webidl')
-rw-r--r--components/script/dom/webidls/Element.webidl14
1 files changed, 8 insertions, 6 deletions
diff --git a/components/script/dom/webidls/Element.webidl b/components/script/dom/webidls/Element.webidl
index f54fd0cf04e..dde5b978890 100644
--- a/components/script/dom/webidls/Element.webidl
+++ b/components/script/dom/webidls/Element.webidl
@@ -14,12 +14,12 @@
*/
interface Element : Node {
-
- readonly attribute DOMString? prefix;
- readonly attribute DOMString localName;
-
[Constant]
readonly attribute DOMString? namespaceURI;
+ [Constant]
+ readonly attribute DOMString? prefix;
+ [Constant]
+ readonly attribute DOMString localName;
// Not [Constant] because it depends on which document we're in
[Pure]
readonly attribute DOMString tagName;
@@ -33,7 +33,9 @@ interface Element : Node {
[SameObject]
readonly attribute NamedNodeMap attributes;
+ [Pure]
DOMString? getAttribute(DOMString name);
+ [Pure]
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
[Throws]
void setAttribute(DOMString name, DOMString value);
@@ -44,10 +46,10 @@ interface Element : Node {
boolean hasAttribute(DOMString name);
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
- [Throws]
+ [Pure, Throws]
Element? closest(DOMString selectors);
- [Throws]
+ [Pure, Throws]
boolean matches(DOMString selectors);
HTMLCollection getElementsByTagName(DOMString localName);