summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-11-22 16:16:29 +0100
committerportix <portix@gmx.net>2012-11-22 16:16:29 +0100
commitb5df95d93b058d909a75497cede97e11631564a9 (patch)
tree62c72f6f47909409dc58b10503b44972aaad769c /api
parent1fbbeccbe3f1b052ae84ec8f74c65436f1305f93 (diff)
downloaddwb-b5df95d93b058d909a75497cede97e11631564a9.zip
New method 'replace' for replacing modules
Diffstat (limited to 'api')
-rw-r--r--api/dwb-js.725
-rw-r--r--api/jsapi.7.txt8
-rw-r--r--api/jsapi.txt18
3 files changed, 49 insertions, 2 deletions
diff --git a/api/dwb-js.7 b/api/dwb-js.7
index 0994d865..88105a28 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: 11/20/2012
+.\" Date: 11/22/2012
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "DWB\-JS" "7" "11/20/2012" "\ \&" "\ \&"
+.TH "DWB\-JS" "7" "11/22/2012" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -240,6 +240,27 @@ The module
.nr an-break-flag 1
.br
.ps +1
+\fBvoid replace(String name, Object module)\fR
+.RS 4
+.sp
+Same as provide but replaces the module if it was already defined\&.
+.PP
+\fIname\fR
+.RS 4
+Name of the module
+.RE
+.PP
+\fImodule\fR
+.RS 4
+The module
+.RE
+.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
\fBvoid require(Array names, Function callback)\fR
.RS 4
.sp
diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt
index 10330aef..8a13d57c 100644
--- a/api/jsapi.7.txt
+++ b/api/jsapi.7.txt
@@ -121,6 +121,14 @@ _name_;; Name of the module
_module_;; The module
****
+==== void replace(String name, Object module)
+****
+Same as provide but replaces the module if it was already defined.
+
+_name_;; Name of the module
+_module_;; The module
+****
+
==== void require(Array names, Function callback)
****
Load modules defined with provide.
diff --git a/api/jsapi.txt b/api/jsapi.txt
index 7ea7f182..44e4e5c6 100644
--- a/api/jsapi.txt
+++ b/api/jsapi.txt
@@ -140,6 +140,24 @@ _module_;; The module
****
****
+[[replace]]
+[float]
+==== *replace()* ====
+
+[source,javascript]
+----
+void replace(String name, Object module)
+----
+
+Same as <<provide>> but replaces the module if it was already defined.
+
+ ::
+
+_name_;; Name of the module
+_module_;; The module
+****
+
+****
[[require]]
[float]
==== *require()* ====