mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -11,11 +11,17 @@
|
|||
|
||||
[Constructor /*, Exposed=Window */]
|
||||
interface Range {
|
||||
[Pure]
|
||||
readonly attribute Node startContainer;
|
||||
[Pure]
|
||||
readonly attribute unsigned long startOffset;
|
||||
[Pure]
|
||||
readonly attribute Node endContainer;
|
||||
[Pure]
|
||||
readonly attribute unsigned long endOffset;
|
||||
[Pure]
|
||||
readonly attribute boolean collapsed;
|
||||
[Pure]
|
||||
readonly attribute Node commonAncestorContainer;
|
||||
|
||||
[Throws]
|
||||
|
@ -40,7 +46,7 @@ interface Range {
|
|||
const unsigned short START_TO_END = 1;
|
||||
const unsigned short END_TO_END = 2;
|
||||
const unsigned short END_TO_START = 3;
|
||||
[Throws]
|
||||
[Pure, Throws]
|
||||
short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
||||
// [Throws]
|
||||
// void deleteContents();
|
||||
|
@ -55,13 +61,15 @@ interface Range {
|
|||
|
||||
[NewObject]
|
||||
Range cloneRange();
|
||||
[Pure]
|
||||
void detach();
|
||||
|
||||
[Throws]
|
||||
[Pure, Throws]
|
||||
boolean isPointInRange(Node node, unsigned long offset);
|
||||
[Throws]
|
||||
[Pure, Throws]
|
||||
short comparePoint(Node node, unsigned long offset);
|
||||
|
||||
[Pure]
|
||||
boolean intersectsNode(Node node);
|
||||
|
||||
// stringifier;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue