Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/61143e0bd261dcb325335d41443204a806abe792
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/61143e0bd261dcb325335d41443204a806abe792
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/61143e0bd261dcb325335d41443204a806abe792

The branch, master has been updated
       via  61143e0bd261dcb325335d41443204a806abe792 (commit)
      from  c17e588b66360e984241a80077ce986a9182f0de (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=61143e0bd261dcb325335d41443204a806abe792
commit 61143e0bd261dcb325335d41443204a806abe792
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    Add some more bits to the jsbinding document
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/docs/jsbinding.md b/docs/jsbinding.md
index c258a67..cf3bc5a 100644
--- a/docs/jsbinding.md
+++ b/docs/jsbinding.md
@@ -57,3 +57,31 @@ binding definitions to implement the interfaces.
 
 The bindings are a Domain Specific Language (DSL) which allows
 implementations to be added to each WebIDL method.
+
+Javascript implementation
+-------------------------
+
+NetSurf consumes the Duktape JS engine in order to run the JS code which
+is used within the browser.  Duktape is exceedingly well documented and
+its API docs at https://duktape.org/api.html are incredibly useful.
+
+It'll be worthwhile learning about how duktape stacks work in order to
+work on bindings in NetSurf
+
+Dukky
+-----
+
+Wrappering around and layering between duktape and the browser is a set of
+functionality we call `dukky`.  This defines a variety of conventions and
+capabilities which are common to almost all bindings.  The header `dukky.h`
+provides the interface to these functions.  Normally these functions are
+subsequently used by automatically generated content, but if your bindings
+need to add DOM nodes back into the JavaScript environment (for example when
+returning them from a method implementation) you will want `dukky_push_node()`
+or when calling a function in a JS context you'll likely want `dukky_pcall()`
+
+Dukky automatically terminates any JS call which lasts for more than 10
+seconds.  If you are calling a JS function from outside any of the "normal"
+means by which dukky might call code on your behalf (`js_exec()`, events, etc)
+then you should be sure to use `dukky_pcall()` and pass in `true` in
+`reset_timeout` otherwise your code may unexpectedly terminate early.


-----------------------------------------------------------------------

Summary of changes:
 docs/jsbinding.md |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/docs/jsbinding.md b/docs/jsbinding.md
index c258a67..cf3bc5a 100644
--- a/docs/jsbinding.md
+++ b/docs/jsbinding.md
@@ -57,3 +57,31 @@ binding definitions to implement the interfaces.
 
 The bindings are a Domain Specific Language (DSL) which allows
 implementations to be added to each WebIDL method.
+
+Javascript implementation
+-------------------------
+
+NetSurf consumes the Duktape JS engine in order to run the JS code which
+is used within the browser.  Duktape is exceedingly well documented and
+its API docs at https://duktape.org/api.html are incredibly useful.
+
+It'll be worthwhile learning about how duktape stacks work in order to
+work on bindings in NetSurf
+
+Dukky
+-----
+
+Wrappering around and layering between duktape and the browser is a set of
+functionality we call `dukky`.  This defines a variety of conventions and
+capabilities which are common to almost all bindings.  The header `dukky.h`
+provides the interface to these functions.  Normally these functions are
+subsequently used by automatically generated content, but if your bindings
+need to add DOM nodes back into the JavaScript environment (for example when
+returning them from a method implementation) you will want `dukky_push_node()`
+or when calling a function in a JS context you'll likely want `dukky_pcall()`
+
+Dukky automatically terminates any JS call which lasts for more than 10
+seconds.  If you are calling a JS function from outside any of the "normal"
+means by which dukky might call code on your behalf (`js_exec()`, events, etc)
+then you should be sure to use `dukky_pcall()` and pass in `true` in
+`reset_timeout` otherwise your code may unexpectedly terminate early.


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to