From 095cb202b05f618aa18610123444463a81e4f8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Sat, 13 Jan 2018 12:00:25 +0100 Subject: [PATCH] Fix 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. --- interfaces/selection-api.idl | 43 +++++++++++++++++++++++++++++ selection/interfaces.html | 53 ++++-------------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) create mode 100644 interfaces/selection-api.idl diff --git a/interfaces/selection-api.idl b/interfaces/selection-api.idl new file mode 100644 index 00000000000000..27efc2acbbf05a --- /dev/null +++ b/interfaces/selection-api.idl @@ -0,0 +1,43 @@ +// 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; +}; diff --git a/selection/interfaces.html b/selection/interfaces.html index 21b3f3e824895e..6b72f286caf9e9 100644 --- a/selection/interfaces.html +++ b/selection/interfaces.html @@ -5,58 +5,14 @@ -