diff options
author | portix <portix@gmx.net> | 2012-11-03 15:03:52 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-11-03 15:03:52 +0100 |
commit | d4f59982568390a2993d47f4361552bbc57c196b (patch) | |
tree | b9ce35b857d4ce61db152adbd2d01b13833a04bb /api/jsapi.txt | |
parent | d2ca0500bfbee25d107e83dfadacffb7ae7635b3 (diff) | |
download | dwb-d4f59982568390a2993d47f4361552bbc57c196b.zip |
Updated api documentation
Diffstat (limited to 'api/jsapi.txt')
-rw-r--r-- | api/jsapi.txt | 72 |
1 files changed, 45 insertions, 27 deletions
diff --git a/api/jsapi.txt b/api/jsapi.txt index 993fcec3..38df9601 100644 --- a/api/jsapi.txt +++ b/api/jsapi.txt @@ -824,24 +824,37 @@ _this_;; The object forEach is called on **** **** -[[setPrivate]] +[[fastIndexOf]] [float] -==== *Object.setPrivate()* ==== +==== *Array.fastIndexOf()* ==== [source,javascript] ---- -void Object.setPrivate(key, value, identifier) +Number Array.fastIndexOf(Object object) ---- -Associates a private value with that object that can only be retrieved in the -calling script, this function is only useful for objects derived from GObjects, -e.g. to associate a value with a webview and keep it invisible in other scripts. +This method is basically the same as +Array.indexOf+ but without type checking. :: -_key_;; The property name -_value_;; The property value -_identifier_;; A local object to identify the calling script, the identifier -must either be of type object or of type function. +_object_;; The object to search for +_returns_;; The index in the array or +-1+ if the Object wasn't found. +**** + +**** +[[fastLastIndexOf]] +[float] +==== *Array.fastLastIndexOf()* ==== +[source,javascript] +---- +Number Array.fastLastIndexOf(Object object) +---- + +This method is basically the same as +Array.lastIndexOf+ but without type checking. + + :: + +_object_;; The object to search for +_returns_;; The index in the array or +-1+ if the Object wasn't found. **** **** @@ -863,38 +876,43 @@ _returns_;; The object set with <<setPrivate>> or +null+. **** **** -[[fastIndexOf]] +[[setPrivate]] [float] -==== *Array.fastIndexOf()* ==== +==== *Object.setPrivate()* ==== [source,javascript] ---- -Number Array.fastIndexOf(Object object) +void Object.setPrivate(key, value, identifier) ---- -This method is basically the same as +Array.indexOf+ but without type checking. +Associates a private value with that object that can only be retrieved in the +calling script, this function is only useful for objects derived from GObjects, +e.g. to associate a value with a webview and keep it invisible in other scripts. :: -_object_;; The object to search for -_returns_;; The index in the array or +-1+ if the Object wasn't found. +_key_;; The property name +_value_;; The property value +_identifier_;; A local object to identify the calling script, the identifier +must either be of type object or of type function. **** -**** -[[fastLastIndexOf]] +==== [float] -==== *Array.fastLastIndexOf()* ==== +==== *Example* ==== [source,javascript] ----- -Number Array.fastLastIndexOf(Object object) ----- +------------ +var self = this; +signals.connect("loadCommitted", function(wv) { + wv.setPrivate("foo", "bar", self); +}); +signals.connect("loadFinished", function(wv) { + io.print(wv.getPrivate("foo", self)); +}); +------------ +==== -This method is basically the same as +Array.lastIndexOf+ but without type checking. - :: -_object_;; The object to search for -_returns_;; The index in the array or +-1+ if the Object wasn't found. -**** [[Webkitobjects]] == Webkit objects == |