Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
custom:javascript [2018/12/05 01:56] – [output] digital man | custom:javascript [2018/12/27 20:03] – [load] include link to 'load' dir page, use writeln() intead of print() in examples digital man | ||
---|---|---|---|
Line 76: | Line 76: | ||
The Synchronet JavaScript object model includes a global method: '' | The Synchronet JavaScript object model includes a global method: '' | ||
- | The '' | + | The '' |
There are 3 primary ways to use the '' | There are 3 primary ways to use the '' | ||
Line 89: | Line 89: | ||
var queue = load(true, ' | var queue = load(true, ' | ||
var value = queue.read(1000); | var value = queue.read(1000); | ||
- | print(value); | + | writeln(value); |
</ | </ | ||
Line 110: | Line 110: | ||
lib.do_thing(); | lib.do_thing(); | ||
if(lib.status_good == true) | if(lib.status_good == true) | ||
- | | + | |
else | else | ||
alert(' | alert(' | ||
Line 117: | Line 117: | ||
This usage expressly places all items created by the loaded script into the scope of the passed variable (in this case, a newly created empty //Object//, just for this purpose). This means there should be no naming conflicts between the parent script and the loaded script (e.g. they may have methods or variables defined with the **same name** and there will be [[https:// | This usage expressly places all items created by the loaded script into the scope of the passed variable (in this case, a newly created empty //Object//, just for this purpose). This means there should be no naming conflicts between the parent script and the loaded script (e.g. they may have methods or variables defined with the **same name** and there will be [[https:// | ||
- | ==== output | + | ==== Output |
There are many different text output methods supported by the Synchronet JavaScript Object Model and knowing which method (function) to use in what situation can be confusing. The following table should help: | There are many different text output methods supported by the Synchronet JavaScript Object Model and knowing which method (function) to use in what situation can be confusing. The following table should help: | ||
Line 138: | Line 138: | ||
===== See Also ===== | ===== See Also ===== | ||
* [[http:// | * [[http:// | ||
- | * [[:util:jsexec]] | + | |
- | * [[:util:baja]] | + | |
+ | * [[:util:Baja]] | ||
+ | * [[: | ||
* [[: | * [[: | ||
{{tag> | {{tag> | ||