bug 153: UTF-8 bookmark.title has been fully implemented.
[elinks.git] / contrib / smjs / README
blobdd0121f69a8de4c9aa5cb942b5a40baad69c67d6
1 Most of the SpiderMonkey scripting interface is documented in the
2 ELinks manual.  This README describes only features added by
3 contrib/smjs/*.js.
6 Multiple functions in the same hook
7 -----------------------------------
9 The default hooks file contrib/smjs/hooks.js assigns functions that
10 provide a mechanism to register multiple functions to each hook. When
11 these default hooks are called, they iterate over all functions that
12 are registered to them, calling each one in serial.
14 If you want to register a preformat_html hook, for example,
15 the preferred way to do so is not this:
17    elinks.preformat_html = foo;
19 but rather this:
21    elinks.preformat_html_hooks.push(foo);
23 which adds foo to an array of functions, over which the default
24 elinks.preformat_html function will iterate.
26 If any function in that array returns false, the default hook
27 will stop iteration, not calling any more handlers. This applies
28 to all of the default hooks:
30 - elinks.preformat_html_hooks
31 - elinks.goto_url_hooks
32 - elinks.follow_url_hooks