diff options
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/jsapi.7.txt | 20 | ||||
-rw-r--r-- | doc/api/jsapi.txt | 44 |
2 files changed, 58 insertions, 6 deletions
diff --git a/doc/api/jsapi.7.txt b/doc/api/jsapi.7.txt index d81f7894..8b156756 100644 --- a/doc/api/jsapi.7.txt +++ b/doc/api/jsapi.7.txt @@ -65,6 +65,17 @@ _name_;; A name that identifies the function on command line, optional _returns_;; true if the function was bound successfully **** +==== 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 +**** + ==== Boolean execute(String command) **** @@ -1769,6 +1780,7 @@ function, it has the following properties and methods: _script.path (Object, read)_;; The path of the script. +_script._arguments (Object, read)_;; *arguments* object of the encapsulating function ==== void script.debug(Object params) **** @@ -1790,8 +1802,12 @@ _returns_;; The private value ==== void script.setPrivate(Object object, String key, String 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 be only retrieved with +*script.getPrivate*. +This is mostly useful for objects derived from GObject since GObjects are shared +between all scripts. _object_;; The object on which the value should be set. _key_;; The property name 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. :: |