summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorportix <none@none>2012-11-11 23:29:12 +0100
committerportix <none@none>2012-11-11 23:29:12 +0100
commit764a3a9fc73810452ba8a0d7c3c8b44c695218a9 (patch)
tree5f8642dc6ac00c7130fc2df9ab0540792aee26e0 /api
parent83283bee0c45bc0b4d4b82e654ac8d72af2853dd (diff)
downloaddwb-764a3a9fc73810452ba8a0d7c3c8b44c695218a9.zip
Adding missing syntax highlighting to jsapi
Diffstat (limited to 'api')
-rw-r--r--api/dwb-js.74
-rw-r--r--api/jsapi.7.txt22
-rw-r--r--api/jsapi.txt4
3 files changed, 24 insertions, 6 deletions
diff --git a/api/dwb-js.7 b/api/dwb-js.7
index 5756ef78..1513114c 100644
--- a/api/dwb-js.7
+++ b/api/dwb-js.7
@@ -2623,7 +2623,7 @@ require(["foo!/path/to/foo"], function(foo) {
.RS 4
.\}
.nf
-provide("foo", { bar : 37; });
+provide("foo", { bar : 37 });
.fi
.if n \{\
.RE
@@ -2640,7 +2640,7 @@ The resolution chain is as follows, first all modules defined with \fBprovide\fR
require(["foo!/path/to/foo"], function(foo) {
io\&.print(foo\&.bar); // 42
});
-provide("foo", { bar : 42; });
+provide("foo", { bar : 42 });
.fi
.if n \{\
.RE
diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt
index 5c46d6c7..a07c4897 100644
--- a/api/jsapi.7.txt
+++ b/api/jsapi.7.txt
@@ -93,6 +93,7 @@ invisible, even in the including script. To use an included script it can return
an object with its public objects:
======
+[source,javascript]
---------------------------------
// included script
@@ -1057,6 +1058,7 @@ gtk/webkit enums to javascript objects.
=== ButtonContext
****
+[source,javascript]
--------
const ButtonContext = {
document : 1 << 1,
@@ -1072,6 +1074,7 @@ const ButtonContext = {
=== ChecksumType
****
+[source,javascript]
--------
const ChecksumType = {
md5 : 0,
@@ -1084,6 +1087,7 @@ const ChecksumType = {
=== ClickType
****
+[source,javascript]
--------
const ClickType = {
click : 4,
@@ -1126,6 +1130,7 @@ const FileTest = {
=== LoadStatus
****
+[source,javascript]
---------
const LoadStatus = {
provisional : 0,
@@ -1140,6 +1145,7 @@ const LoadStatus = {
=== Modifier
****
+[source,javascript]
--------
const Modifier = {
Shift : 1 << 0,
@@ -1167,6 +1173,7 @@ const Modifier = {
=== NavigationReason
****
+[source,javascript]
--------
const NavigationReason = {
linkClicked : 0,
@@ -1182,6 +1189,7 @@ const NavigationReason = {
=== SpawnError
****
+[source,javascript]
--------
const SpawnError = {
success : 0,
@@ -1195,6 +1203,7 @@ const SpawnError = {
=== Modes
****
+[source,javascript]
--------
const Modes = {
NormalMode : 1<<0,
@@ -1238,6 +1247,7 @@ defined with +provide+ and loaded with +require+.
.Defining modules
+[source,javascript]
-------
#!javascript
@@ -1255,6 +1265,7 @@ provide("myOtherModule", {
-------
.Getting some modules
+[source,javascript]
-------
#!javascript
@@ -1267,6 +1278,7 @@ require(["myModule", "myOtherModule"], function(myModule, myOtherModule) {
-------
.Getting all modules
+[source,javascript]
-------
#!javascript
@@ -1281,6 +1293,7 @@ require(null, function(modules) {
It is also possible to specify a path in the name array. The name then follows
the format *name!path*:
+[source,javascript]
-------
#!javascript
@@ -1290,8 +1303,9 @@ require(["foo!/path/to/foo"], function(foo) {
-------
./path/to/foo
+[source,javascript]
-------
-provide("foo", { bar : 37; });
+provide("foo", { bar : 37 });
-------
The resolution chain is as follows, first all modules defined with *provide* and
@@ -1307,7 +1321,7 @@ is ignored and the stored module will be resolved:
require(["foo!/path/to/foo"], function(foo) {
io.print(foo.bar); // 42
});
-provide("foo", { bar : 42; });
+provide("foo", { bar : 42 });
-------
[source,javascript]
@@ -1386,6 +1400,7 @@ _defaults_;; Default settings, for each setting in domains, hosts and uris a
Example using extensions.load:
+[source,javascript]
----
extensions.load("perdomainsettings", {
domains : {
@@ -1467,6 +1482,7 @@ extensions.load("userscripts", [ "/path/to/script1", "/path/to/script2" ]);
Extensions can be loaded by an userscript
+[source,javascript]
------
#!javascript
@@ -1479,6 +1495,7 @@ extensions.load("extension_2", {
To load/unload extensions on the fly *extensions.bind* can be used:
+[source,javascript]
------
#!javascript
@@ -1663,6 +1680,7 @@ return {
==== Example extensionrc
+[source,javascript]
--------
return {
foobar : { bar : "X", foo : 37 }, // config for extension foobar
diff --git a/api/jsapi.txt b/api/jsapi.txt
index 278a1ffd..992423f8 100644
--- a/api/jsapi.txt
+++ b/api/jsapi.txt
@@ -2186,7 +2186,7 @@ require(["foo!/path/to/foo"], function(foo) {
./path/to/foo
[source,javascript]
-------
-provide("foo", { bar : 37; });
+provide("foo", { bar : 37 });
-------
The resolution chain is as follows, first all modules defined with +provide+ and
@@ -2202,7 +2202,7 @@ is ignored and the stored module will be resolved:
require(["foo!/path/to/foo"], function(foo) {
io.print(foo.bar); // 42
});
-provide("foo", { bar : 42; });
+provide("foo", { bar : 42 });
-------
[source,javascript]