2022-02-15 16:10:51 -03:00
|
|
|
#import <DOM/Node.idl>
|
2022-01-30 20:35:51 -03:00
|
|
|
#import <DOM/AbstractRange.idl>
|
2022-12-09 15:50:42 -03:00
|
|
|
#import <Geometry/DOMRect.idl>
|
2022-02-15 16:10:51 -03:00
|
|
|
|
2023-10-25 12:27:19 -03:00
|
|
|
// https://dom.spec.whatwg.org/#interface-range
|
2023-09-02 11:00:01 -03:00
|
|
|
[Exposed=Window]
|
2022-01-30 20:35:51 -03:00
|
|
|
interface Range : AbstractRange {
|
2021-02-17 18:53:04 -03:00
|
|
|
constructor();
|
|
|
|
|
|
2022-02-25 16:45:03 -03:00
|
|
|
readonly attribute Node commonAncestorContainer;
|
|
|
|
|
|
2021-01-23 13:58:14 -03:00
|
|
|
undefined setStart(Node node, unsigned long offset);
|
|
|
|
|
undefined setEnd(Node node, unsigned long offset);
|
2022-01-31 14:35:03 -03:00
|
|
|
undefined setStartBefore(Node node);
|
|
|
|
|
undefined setStartAfter(Node node);
|
|
|
|
|
undefined setEndBefore(Node node);
|
|
|
|
|
undefined setEndAfter(Node node);
|
2022-01-31 15:42:36 -03:00
|
|
|
undefined collapse(optional boolean toStart = false);
|
2022-01-31 15:33:41 -03:00
|
|
|
undefined selectNode(Node node);
|
2022-01-31 15:51:46 -03:00
|
|
|
undefined selectNodeContents(Node node);
|
2021-01-23 13:58:14 -03:00
|
|
|
|
2022-01-31 15: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 16:17:52 -03:00
|
|
|
[CEReactions] undefined deleteContents();
|
2022-03-21 14:06:28 -03:00
|
|
|
[CEReactions, NewObject] DocumentFragment extractContents();
|
2022-03-22 16:03:09 -03:00
|
|
|
[CEReactions, NewObject] DocumentFragment cloneContents();
|
2022-03-21 14:58:00 -03:00
|
|
|
[CEReactions] undefined insertNode(Node node);
|
2022-03-21 19:28:46 -03:00
|
|
|
[CEReactions] undefined surroundContents(Node newParent);
|
2022-03-21 14:06:28 -03:00
|
|
|
|
2024-10-14 06:55:51 -03:00
|
|
|
[NewObject] Range cloneRange();
|
2022-01-31 15:58:08 -03:00
|
|
|
undefined detach();
|
2021-01-23 13:58:14 -03:00
|
|
|
|
2022-02-01 15:45:34 -03:00
|
|
|
boolean isPointInRange(Node node, unsigned long offset);
|
2022-02-01 15:53:58 -03:00
|
|
|
short comparePoint(Node node, unsigned long offset);
|
2022-02-01 15:45:34 -03:00
|
|
|
|
2022-01-31 16:10:12 -03:00
|
|
|
boolean intersectsNode(Node node);
|
|
|
|
|
|
2024-10-14 06:55:51 -03:00
|
|
|
// https://drafts.csswg.org/cssom-view/#extensions-to-the-range-interface
|
2024-01-19 09:55:37 -03:00
|
|
|
DOMRectList getClientRects();
|
2024-10-14 06:55:51 -03:00
|
|
|
[NewObject] DOMRect getBoundingClientRect();
|
2022-12-09 15:50:42 -03:00
|
|
|
|
2022-03-21 12:29:19 -03:00
|
|
|
stringifier;
|
|
|
|
|
|
2024-06-25 15:51:18 -03:00
|
|
|
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-range-createcontextualfragment
|
|
|
|
|
// FIXME: [CEReactions, NewObject] DocumentFragment createContextualFragment((TrustedHTML or DOMString) string);
|
|
|
|
|
[CEReactions, NewObject] DocumentFragment createContextualFragment(DOMString string);
|
2021-01-23 13:58:14 -03:00
|
|
|
};
|