summaryrefslogtreecommitdiff
path: root/api/jsapi.7.txt
diff options
context:
space:
mode:
Diffstat (limited to 'api/jsapi.7.txt')
-rw-r--r--api/jsapi.7.txt34
1 files changed, 34 insertions, 0 deletions
diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt
index 3ad27d95..cc1a8bb6 100644
--- a/api/jsapi.7.txt
+++ b/api/jsapi.7.txt
@@ -400,6 +400,14 @@ _func_;; A function
_returns_;; The body of the function as a string
****
+==== Number util.getMode()
+****
+
+Gets the the current mode.
+
+_returns_;; The mode, see Modes for possible modes.
+****
+
==== String util.domainFromHost(String hostname)
****
@@ -749,6 +757,19 @@ _hittestresult_;; Hittestresult under the cursor
_event_;; Same as buttonPress but without _event.type_
****
+==== changeMode
+
+****
+----
+signals.connect("changeMode", function(webview, mode));
+----
+
+Emitted when the mode changes, return true to prevent the change.
+
+_webview_;; The focused webview
+_mode_;; A mode, see also Modes for possible modes
+****
+
==== close
****
@@ -1166,6 +1187,19 @@ const SpawnError = {
--------
****
+=== Modes
+
+****
+--------
+const Modes = {
+ NormalMode : 1<<0,
+ InsertMode : 1<<1,
+ CommandMode : 1<<2
+};
+--------
+****
+
+
== GLOBAL DATA ==
Since all scripts share the same execution context, they are encapsulated in a
function. To avoid conflicts with other scripts it is not allowed to set properties