2022-02-15 22:10:51 +03:00
|
|
|
#import <DOM/Node.idl>
|
2022-01-31 02:35:51 +03:00
|
|
|
#import <DOM/AbstractRange.idl>
|
2022-12-09 21:50:42 +03:00
|
|
|
#import <Geometry/DOMRect.idl>
|
2022-02-15 22:10:51 +03:00
|
|
|
|
2023-10-25 18:27:19 +03:00
|
|
|
// https://dom.spec.whatwg.org/#interface-range
|
2023-09-02 17:00:01 +03:00
|
|
|
[Exposed=Window]
|
2022-01-31 02:35:51 +03:00
|
|
|
interface Range : AbstractRange {
|
2021-01-23 19:58:14 +03:00
|
|
|
|
2021-02-18 00:53:04 +03:00
|
|
|
constructor();
|
|
|
|
|
2022-02-25 22:45:03 +03:00
|
|
|
readonly attribute Node commonAncestorContainer;
|
|
|
|
|
2021-01-23 19:58:14 +03:00
|
|
|
undefined setStart(Node node, unsigned long offset);
|
|
|
|
undefined setEnd(Node node, unsigned long offset);
|
2022-01-31 20:35:03 +03:00
|
|
|
undefined setStartBefore(Node node);
|
|
|
|
undefined setStartAfter(Node node);
|
|
|
|
undefined setEndBefore(Node node);
|
|
|
|
undefined setEndAfter(Node node);
|
2022-01-31 21:42:36 +03:00
|
|
|
undefined collapse(optional boolean toStart = false);
|
2022-01-31 21:33:41 +03:00
|
|
|
undefined selectNode(Node node);
|
2022-01-31 21:51:46 +03:00
|
|
|
undefined selectNodeContents(Node node);
|
2021-01-23 19:58:14 +03:00
|
|
|
|
2022-01-31 21:13:15 +03:00
|
|
|
const unsigned short START_TO_START = 0;
|
|
|
|
const unsigned short START_TO_END = 1;
|
|
|
|
const unsigned short END_TO_END = 2;
|
|
|
|
const unsigned short END_TO_START = 3;
|
|
|
|
short compareBoundaryPoints(unsigned short how, Range sourceRange);
|
|
|
|
|
2022-03-22 22:17:52 +03:00
|
|
|
[CEReactions] undefined deleteContents();
|
2022-03-21 20:06:28 +03:00
|
|
|
[CEReactions, NewObject] DocumentFragment extractContents();
|
2022-03-22 22:03:09 +03:00
|
|
|
[CEReactions, NewObject] DocumentFragment cloneContents();
|
2022-03-21 20:58:00 +03:00
|
|
|
[CEReactions] undefined insertNode(Node node);
|
2022-03-22 01:28:46 +03:00
|
|
|
[CEReactions] undefined surroundContents(Node newParent);
|
2022-03-21 20:06:28 +03:00
|
|
|
|
2021-01-23 19:58:14 +03:00
|
|
|
Range cloneRange();
|
2022-01-31 21:58:08 +03:00
|
|
|
undefined detach();
|
2021-01-23 19:58:14 +03:00
|
|
|
|
2022-02-01 21:45:34 +03:00
|
|
|
boolean isPointInRange(Node node, unsigned long offset);
|
2022-02-01 21:53:58 +03:00
|
|
|
short comparePoint(Node node, unsigned long offset);
|
2022-02-01 21:45:34 +03:00
|
|
|
|
2022-01-31 22:10:12 +03:00
|
|
|
boolean intersectsNode(Node node);
|
|
|
|
|
2024-01-19 15:55:37 +03:00
|
|
|
DOMRectList getClientRects();
|
2022-12-09 21:50:42 +03:00
|
|
|
DOMRect getBoundingClientRect();
|
|
|
|
|
2022-03-21 18:29:19 +03:00
|
|
|
stringifier;
|
|
|
|
|
2023-03-10 16:56:44 +03:00
|
|
|
// Extensions from the DOM Parsing specification:
|
|
|
|
[CEReactions, NewObject] DocumentFragment createContextualFragment(DOMString fragment);
|
|
|
|
|
2021-01-23 19:58:14 +03:00
|
|
|
};
|