diff options
author | portix <none@none> | 2013-01-26 13:24:31 +0100 |
---|---|---|
committer | portix <none@none> | 2013-01-26 13:24:31 +0100 |
commit | 83da4f3b781fd56d0c88db99c8cc64c86ba6309f (patch) | |
tree | 581b3478c3b934325239f557e70b9aa7e4c6dd97 /api | |
parent | 0082dad9b0c87fcb01d7ca72c16eb6a1d7e131db (diff) | |
download | dwb-83da4f3b781fd56d0c88db99c8cc64c86ba6309f.zip |
Implementing tabs.iterate
Diffstat (limited to 'api')
-rw-r--r-- | api/dwb-js.7 | 22 | ||||
-rw-r--r-- | api/jsapi.7.txt | 11 | ||||
-rw-r--r-- | api/jsapi.txt | 19 |
3 files changed, 47 insertions, 5 deletions
diff --git a/api/dwb-js.7 b/api/dwb-js.7 index 8964b910..0056b131 100644 --- a/api/dwb-js.7 +++ b/api/dwb-js.7 @@ -2,12 +2,12 @@ .\" Title: dwb-js .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/> -.\" Date: 01/17/2013 +.\" Date: 01/26/2013 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "DWB\-JS" "7" "01/17/2013" "\ \&" "\ \&" +.TH "DWB\-JS" "7" "01/26/2013" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -457,7 +457,7 @@ Either the function or the optional name passed to bind\&. .PP \fIreturns\fR .RS 4 -true if the function is unbinded +true if the function was unbound .RE .RE .SH "GLOBAL OBJECTS" @@ -899,6 +899,22 @@ Number of the tab The corresponding webview .RE .RE +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBwebview tabs.nth(Function callback)\fR +.RS 4 +.sp +Iterates over all tabs until the callback returns true\&. +.PP +\fIcallback\fR +.RS 4 +Callback that is called for every tab\&. The function has two parameters, the webview and the index which will be the same as webview\&.number\&. +.RE +.RE .SS "util" .sp The util object implements helper methods\&. diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt index ec361e4d..be429a29 100644 --- a/api/jsapi.7.txt +++ b/api/jsapi.7.txt @@ -228,7 +228,7 @@ _returns_;; true if the timer was stopped Unbind a shortcut that was previously binded with bind _func_ or _name_;; Either the function or the optional name passed to bind. -_returns_;; true if the function is unbinded +_returns_;; true if the function was unbound **** @@ -413,6 +413,15 @@ _n_;; Number of the tab _returns_;; The corresponding webview **** +==== webview tabs.nth(Function callback) +**** + +Iterates over all tabs until the callback returns true. + +_callback_;; Callback that is called for every tab. The function has two +parameters, the webview and the index which will be the same as webview.number. +**** + === util === diff --git a/api/jsapi.txt b/api/jsapi.txt index efe43ff3..ef029b96 100644 --- a/api/jsapi.txt +++ b/api/jsapi.txt @@ -312,7 +312,7 @@ Unbind a shortcut that was previously binded with <<bind>> :: _func_ or _name_;; Either the function or the optional name passed to <<bind>>. -_returns_;; +true+ if the function is unbinded +_returns_;; +true+ if the function was unbound **** ====== @@ -758,6 +758,23 @@ _n_;; Number of the tab _returns_;; The corresponding <<webview>> **** +**** +[float] +==== *iterate()* ==== + +[source,javascript] +---- +void tabs.iterate(Function callback) +---- + +Iterates over all tabs until the callback returns true. + + :: + +_callback_;; Callback that is called for every tab. The function has two +parameters, the webview and the index which will be the same as webview.number. +**** + ==== .Example |