From c9c7b7d771b1a8ddcd694b161646a835d32e06d2 Mon Sep 17 00:00:00 2001 From: portix Date: Sun, 24 Feb 2013 14:56:56 +0100 Subject: New object settings --- api/dwb-js.7 | 18 ++++++++++++++++-- api/jsapi.7.txt | 13 +++++++++++++ api/jsapi.txt | 16 ++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/dwb-js.7 b/api/dwb-js.7 index 2283e2d5..48da24da 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.78.0 -.\" Date: 02/23/2013 +.\" Date: 02/24/2013 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "DWB\-JS" "7" "02/23/2013" "\ \&" "\ \&" +.TH "DWB\-JS" "7" "02/24/2013" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1507,6 +1507,20 @@ Deferred\&.when(syncOperation(), function() {\&.\&.\&.}); .RE .\} .RE +.SS "settings" +.sp +Readonly object that can be used to query dwb\(cqs current settings, all settings can also be used in camelcase, to modify settings \fBexecute\fR can be used\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +if (settings\&.enablePrivateBrowsing == true) + execute("set enable\-private\-browsing false"); +.fi +.if n \{\ +.RE +.\} .SH "WEBKIT OBJECTS" .sp All webkit objects correspond to gobject objects, i\&.e\&. they have the same properties, but the javascript properties are all camelcase\&. For example, a WebKitWebView has the property \fBzoom\-level\fR, the corresponding javascript property is \fBzoomLevel\fR: diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt index dc0a417d..76cc98d7 100644 --- a/api/jsapi.7.txt +++ b/api/jsapi.7.txt @@ -761,6 +761,19 @@ Deferred.when(asyncOperation(), function() {...}); Deferred.when(syncOperation(), function() {...}); --------------------------------- +=== settings === + +Readonly object that can be used to query dwb's current settings, all settings +can also be used in camelcase, to modify settings *execute* can be used. + +==== +[source,javascript] +--------------------------------- +if (settings.enablePrivateBrowsing == true) + execute("set enable-private-browsing false"); +--------------------------------- +==== + == WEBKIT OBJECTS == diff --git a/api/jsapi.txt b/api/jsapi.txt index 918f7650..25eddd9f 100644 --- a/api/jsapi.txt +++ b/api/jsapi.txt @@ -1403,6 +1403,22 @@ Deferred.when(asyncOperation(), function() {...}); Deferred.when(syncOperation(), function() {...}); --------------------------------- +[[settings]] +=== settings === + +Readonly object that can be used to query dwb's current settings, all settings +can also be used in camelcase, to modify settings *execute* can be used. + +.Example + +==== +[source,javascript] +--------------------------------- +if (settings.enablePrivateBrowsing == true) + execute("set enable-private-browsing false"); +--------------------------------- +==== + [[Webkitobjects]] == Webkit objects == -- cgit v1.2.3