summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorportix <none@none>2012-06-04 14:47:37 +0200
committerportix <none@none>2012-06-04 14:47:37 +0200
commit1e941e5a993d7f5b33a52a320db8861e746bde97 (patch)
tree3b7fc31cbd29abf959eb55b1a78049abdc282598 /api
parentd3c03a834b0c8d4b2b5486e193d0993b87bd9b48 (diff)
downloaddwb-1e941e5a993d7f5b33a52a320db8861e746bde97.zip
New signal documentFinished
Diffstat (limited to 'api')
-rw-r--r--api/jsapi.txt130
1 files changed, 66 insertions, 64 deletions
diff --git a/api/jsapi.txt b/api/jsapi.txt
index 8f751ea0..b8442924 100644
--- a/api/jsapi.txt
+++ b/api/jsapi.txt
@@ -62,6 +62,27 @@ _callback_;; callback function that will be called when the shortcut is pressed
****
****
+[[domainFromHost]]
+[float]
+==== *domainFromHost()* ====
+
+[source,javascript]
+----
+String domainFromHost(String hostname)
+----
+
+Gets the base domain name from a hostname where the base domain name is the
+effective second level domain name, e.g. for www.example.com it will be
+example.com, for www.example.co.uk it will be example.co.uk.
+
+ ::
+
+_hostname_;; a hostname
+_returns_;; the base domain
+****
+
+
+****
[[execute]]
[float]
==== *execute()* ====
@@ -90,7 +111,7 @@ _returns_;; +true+ if execution was successful
Boolean exit()
----
-Exit dwb, must be called when the script is running from commandline.
+Exit dwb, must be called if the script is running from commandline.
****
@@ -101,7 +122,7 @@ Exit dwb, must be called when the script is running from commandline.
[source,javascript]
----
-Boolean include(String path, [Boolean global])
+Value include(String path, [Boolean global])
----
Includes a file. Note that there is only one context, all scripts are
@@ -194,26 +215,6 @@ _id_;; The id returned from <<timerStart>>
_returns_;; +true+ if the timer was stopped
****
-****
-[[domainFromHost]]
-[float]
-==== *domainFromHost()* ====
-
-[source,javascript]
-----
-String domainFromHost(String hostname)
-----
-
-Gets the base domain name from a hostname where the base domain name is the
-effective second level domain name, e.g. for www.example.com it will be
-example.com, for www.example.co.uk it will be example.co.uk.
-
- ::
-
-_hostname_;; a hostname
-_returns_;; the base domain
-****
-
======
.Example
[source,javascript]
@@ -387,42 +388,42 @@ _returns_;; The text that was entered or +null+
****
-[[write]]
+[[read]]
[float]
-==== *write()* ====
+==== *read()* ====
[source,javascript]
----
-Boolean io.write(String path, String mode, String text)
+String io.read(String path)
----
-Write to a file
+Read from a file.
::
-_path_;; Path to a file to write to
-_mode_;; Either +"a"+ to append to the file, or +"w"+ to strip the file or
-create a new file.
-_text_;; The text that should be written to the file
-_returns_;; +true+ if writing was successful
+_path_;; Path to a file that should be read
+_returns_;; A string with the file content
****
****
-[[read]]
+[[write]]
[float]
-==== *read()* ====
+==== *write()* ====
[source,javascript]
----
-String io.read(String path)
+Boolean io.write(String path, String mode, String text)
----
-Read from a file.
+Write to a file
::
-_path_;; Path to a file that should be read
-_returns_;; A string with the file content
+_path_;; Path to a file to write to
+_mode_;; Either +"a"+ to append to the file, or +"w"+ to strip the file or
+create a new file.
+_text_;; The text that should be written to the file
+_returns_;; +true+ if writing was successful
****
@@ -460,6 +461,24 @@ _returns_;; +true+ if any of the test on the flags is true
****
****
+[[getEnv]]
+[float]
+==== *getEnv()* ====
+
+[source,javascript]
+----
+String system.getEnv(String name)
+----
+
+Get a system environment variable
+
+ ::
+
+_name_;; Name of the variable
+_returns_;; The variable or +null+ if the variable wasn't found
+****
+
+****
[[mkdir]]
[float]
==== *mkdir()* ====
@@ -517,24 +536,6 @@ _command_;; The command to execute
_returns_;; An object that contains +stdout+, +stderr+ and +status+.
****
-****
-[[getEnv]]
-[float]
-==== *getEnv()* ====
-
-[source,javascript]
-----
-String system.getEnv(String name)
-----
-
-Get a system environment variable
-
- ::
-
-_name_;; Name of the variable
-_returns_;; The variable or +null+ if the variable wasn't found
-****
-
====
.Example
[source,javascript]
@@ -729,38 +730,39 @@ All frames of a webview including the mainframe
****
[float]
-==== *mainFrame* ====
+==== *focusedFrame* ====
[source,javascript]
----
-wv.mainFrame frame read
+wv.focusedFrame frame read
----
-The main frame of the webview
+The focused frame of the webview
****
+
****
[float]
-==== *number* ====
+==== *mainFrame* ====
[source,javascript]
----
-wv.number frame read
+wv.mainFrame frame read
----
-The number of the webview, starting at 0
+The main frame of the webview
****
****
[float]
-==== *focusedFrame* ====
+==== *number* ====
[source,javascript]
----
-wv.focusedFrame frame read
+wv.number frame read
----
-The focused frame of the webview
+The number of the webview, starting at 0
****
==== Functions ====