From 0975076abe3529e19dcd23655697791c39c3ff78 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 22 Apr 2017 07:29:28 +0100 Subject: Refactor getSelectionType() to DOM utils. This is a no-op. It is preparatory to implementing a suitable polyfill for `selection.type` for Firefox. --- lib/dom_utils.coffee | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/dom_utils.coffee') diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 06db1b9b..8fdc319e 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -326,6 +326,10 @@ DomUtils = @suppressEvent event handlerStack.suppressEvent + + getSelectionType: (selection) -> + selection.type + # Adapted from: http://roysharon.com/blog/37. # This finds the element containing the selection focus. getElementWithFocus: (selection, backwards) -> -- cgit v1.2.3