summaryrefslogtreecommitdiff
path: root/doc/api/jsapi.txt
diff options
context:
space:
mode:
authorportix <none@none>2013-03-04 18:53:17 +0100
committerportix <none@none>2013-03-04 18:53:17 +0100
commit1d54ab8d88d59f7dfb79d417e81f000a3cacfc41 (patch)
treec78b55ee6d3ae348bb272b668f661e438b9d3ad8 /doc/api/jsapi.txt
parentad996d9cf4e143b17feeee9e4d43542169a7091b (diff)
downloaddwb-1d54ab8d88d59f7dfb79d417e81f000a3cacfc41.zip
Api documentation: checksum/setPrivate/getPrivate
Diffstat (limited to 'doc/api/jsapi.txt')
-rw-r--r--doc/api/jsapi.txt44
1 files changed, 40 insertions, 4 deletions
diff --git a/doc/api/jsapi.txt b/doc/api/jsapi.txt
index a7ac47fe..6244b87a 100644
--- a/doc/api/jsapi.txt
+++ b/doc/api/jsapi.txt
@@ -89,6 +89,25 @@ _name_;; A name that identifies the function on command line, optional
_returns_;; +true+ if the function was bound successfully
****
+****
+[[checksum]]
+[float]
+==== *checksum()* ====
+
+[source,javascript]
+----
+String checksum(String data, [ChecksumType type])
+----
+
+Computes a checksum for given data.
+
+ ::
+
+_shortcut_;; The to compute the checksum for.
+_type_;; The type of the checksum, optional, defaults to ChecksumType.sha256
+_returns_;; The checksum
+****
+
****
[[execute]]
@@ -3126,6 +3145,18 @@ The path of the script.
****
****
+[float]
+==== *_arguments* ====
+
+[source,javascript]
+----
+script._arguments string read
+----
+
+*arguments* object of the encapsulating function
+****
+
+****
[[thisdebug]]
[float]
==== *debug()* ====
@@ -3140,7 +3171,7 @@ an Error, this method will also print the corresponding source of the error.
****
****
-[[thissetprivate]]
+[[getPrivate]]
[float]
==== *getPrivate()* ====
@@ -3149,7 +3180,8 @@ an Error, this method will also print the corresponding source of the error.
Object script.getPrivate(Object object, String key, Object value)
----
-Gets a private property of an object previously set with <<setPrivate>>.
+Gets a private property of an object previously set with
+<<setPrivate,script.setPrivate>>.
::
@@ -3169,8 +3201,12 @@ _returns_;; The private value
void script.setPrivate(Object object, String key, Object value)
----
-Sets a private property on an object, this is mostly useful for objects derived
-from GObject since GObjects are shared between all scripts.
+Convenience method to set a private property on an object that doesn't conflict
+with properties set in other scripts, it uses a random unique id to set
+the property, so the property can most likely only be retrieved with
+<<getPrivate,script.getPrivate>>.
+This is mostly useful for objects derived from GObject since GObjects are shared
+between all scripts.
::