Return cursor position for query object (fixes #228)

Change-Id: I8a7e872dfcce38d2f525d07c1bb3fc84f25250c3
diff --git a/dev/js/src/hint.js b/dev/js/src/hint.js
index 80262cc..de9c09b 100644
--- a/dev/js/src/hint.js
+++ b/dev/js/src/hint.js
@@ -153,6 +153,14 @@
 
 
     /**
+     * Return selection range of the input field.
+     */
+    selectionRange : function () {
+      return this._inputField.selectionRange();
+    },
+
+
+    /**
      * Alert at a specific character position.
      */
     alert : function (charPos, msg) {