Synchronet v3.17b-Win32 (install) has been released (Jan-2019).

New Synchronet YouTube channel

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
custom:javascript:lib:index [2018/12/27 20:00]
digital man List the JS lib child documents (just one for now)
custom:javascript:lib:index [2019/01/11 19:07] (current)
digital man [Require vs. Load] Added comment about exit() use in libraries
Line 10: Line 10:
 The ''​require()''​ function (added in Synchronet v3.17) is identical in usage to ''​load()''​ with the exception that it will //​conditionally//​ load and execute the script only if the property name argument (specified just after the filename argument) is not already defined in the target scope. This prevents redundant loading/​compilation/​execution of libraries shared among multiple modules. For large libraries or commonly used libraries, consider using ''​require()''​ instead of ''​load()''​ to enhance performance and avoid the possible erroneous redefinition of ''​const''​ variables during subsequent ''​load()''​ operations of the same library. The ''​require()''​ function (added in Synchronet v3.17) is identical in usage to ''​load()''​ with the exception that it will //​conditionally//​ load and execute the script only if the property name argument (specified just after the filename argument) is not already defined in the target scope. This prevents redundant loading/​compilation/​execution of libraries shared among multiple modules. For large libraries or commonly used libraries, consider using ''​require()''​ instead of ''​load()''​ to enhance performance and avoid the possible erroneous redefinition of ''​const''​ variables during subsequent ''​load()''​ operations of the same library.
  
 +===== exit ===== 
 +Libraries should **not** (normally) call the global ''​exit()''​ method or else the calling script(s) will also terminate, possibly unexpectedly.
 ===== Styles ===== ===== Styles =====
 There are 3 main //styles// of JavaScript libraries included with Synchronet: There are 3 main //styles// of JavaScript libraries included with Synchronet:

In Other Languages