Automatic update from web-platform-testsFix Selection API idlharness.js test It was entirely broken because SVGElement was unknown. Drive-by: split out the IDL into selection-api.idl. Like with webrtc-pc.idl, match the spec shortname and not the wpt dir. wpt-commits: 6fbbcf8242c40b8ec0dc4ab7ebec9c7a2ae55a34 wpt-pr: 9024 wpt-commits: 6fbbcf8242c40b8ec0dc4ab7ebec9c7a2ae55a34 wpt-pr: 9024
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
// http://w3c.github.io/selection-api/#selection-interface
|
|
interface Selection {
|
|
readonly attribute Node? anchorNode;
|
|
readonly attribute unsigned long anchorOffset;
|
|
readonly attribute Node? focusNode;
|
|
readonly attribute unsigned long focusOffset;
|
|
readonly attribute boolean isCollapsed;
|
|
readonly attribute unsigned long rangeCount;
|
|
readonly attribute DOMString type;
|
|
Range getRangeAt(unsigned long index);
|
|
void addRange(Range range);
|
|
void removeRange(Range range);
|
|
void removeAllRanges();
|
|
void empty();
|
|
void collapse(Node? node, optional unsigned long offset = 0);
|
|
void setPosition(Node? node, optional unsigned long offset = 0);
|
|
void collapseToStart();
|
|
void collapseToEnd();
|
|
void extend(Node node, optional unsigned long offset = 0);
|
|
void setBaseAndExtent(Node anchorNode,
|
|
unsigned long anchorOffset,
|
|
Node focusNode,
|
|
unsigned long focusOffset);
|
|
void selectAllChildren(Node node);
|
|
[CEReactions]
|
|
void deleteFromDocument();
|
|
boolean containsNode(Node node,
|
|
optional boolean allowPartialContainment = false);
|
|
stringifier DOMString ();
|
|
};
|
|
|
|
partial interface Document {
|
|
Selection? getSelection();
|
|
};
|
|
|
|
partial interface Window {
|
|
Selection? getSelection();
|
|
};
|
|
|
|
partial interface GlobalEventHandlers {
|
|
attribute EventHandler onselectstart;
|
|
attribute EventHandler onselectionchange;
|
|
};
|