diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-23 09:16:50 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-23 09:16:50 +0200 |
commit | 0a9acadccafe04aa5bc3335523bb55fe52ca8e50 (patch) | |
tree | ab49c5db5979719019b24c9086aa3701655702d5 /dom/webidl | |
parent | c30ebdac27c93b57e368c69e9c13055a17229992 (diff) | |
download | uxp-0a9acadccafe04aa5bc3335523bb55fe52ca8e50.tar.gz |
moebius#121: DOM - Selection API - getSelection() should exist on XMLDocument / Selection.type
https://github.com/MoonchildProductions/moebius/pull/121
Diffstat (limited to 'dom/webidl')
-rw-r--r-- | dom/webidl/Document.webidl | 6 | ||||
-rw-r--r-- | dom/webidl/HTMLDocument.webidl | 4 | ||||
-rw-r--r-- | dom/webidl/Selection.webidl | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl index f05656e840..0b8c278fea 100644 --- a/dom/webidl/Document.webidl +++ b/dom/webidl/Document.webidl @@ -430,6 +430,12 @@ partial interface Document { void removeAnonymousContent(AnonymousContent aContent); }; +// http://w3c.github.io/selection-api/#extensions-to-document-interface +partial interface Document { + [Throws] + Selection? getSelection(); +}; + // Extension to give chrome JS the ability to determine whether // the user has interacted with the document or not. partial interface Document { diff --git a/dom/webidl/HTMLDocument.webidl b/dom/webidl/HTMLDocument.webidl index 61b466ff0d..42f6d98f79 100644 --- a/dom/webidl/HTMLDocument.webidl +++ b/dom/webidl/HTMLDocument.webidl @@ -73,10 +73,6 @@ interface HTMLDocument : Document { readonly attribute HTMLAllCollection all; - // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections - [Throws] - Selection? getSelection(); - // @deprecated These are old Netscape 4 methods. Do not use, // the implementation is no-op. // XXXbz do we actually need these anymore? diff --git a/dom/webidl/Selection.webidl b/dom/webidl/Selection.webidl index c90844dfa2..c3eac016cb 100644 --- a/dom/webidl/Selection.webidl +++ b/dom/webidl/Selection.webidl @@ -33,6 +33,7 @@ interface Selection { void deleteFromDocument(); readonly attribute unsigned long rangeCount; + readonly attribute DOMString type; [Throws] Range getRangeAt(unsigned long index); [Throws] @@ -77,7 +78,7 @@ partial interface Selection { void removeSelectionListener(nsISelectionListener listenerToRemove); [ChromeOnly,BinaryName="rawType"] - readonly attribute short type; + readonly attribute short selectionType; [ChromeOnly,Throws,Pref="dom.testing.selection.GetRangesForInterval"] sequence<Range> GetRangesForInterval(Node beginNode, long beginOffset, Node endNode, long endOffset, |