mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Annotate many DOM attribute and methods with [Constant] and [Pure]
This commit is contained in:
parent
4dbf391e83
commit
49219baab8
18 changed files with 69 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue