You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The modevlib library is a collection of smaller libraries for building charting dashboards. It copies the import.js[1] and thread.js[2] source code, which have their own documentation.
I tried to add thread.js directly, but it requires the aLog.js library, which in turn requires the template library, etc. The dependency list is too much to add in as <script> tags manually. Is it possible to do a blocking importScript(['modevlib/main.js']) instead?
thread.js should work without aLog.js. thread.js will make a simplified version of the Log object if it does not already exist.
Yes, you are right, if you want to use the code in aLog.js also, then the dependency tree gets big fast. In this case, your main page should have something like:
<script type="application/javascript">
importScript(['js/main_lib.js'], function(){
//SETUP JAVASCRIPT HOOKS FOR PAGE HERE
})
</script>
This script will be run during page load, so should be one of the first scripts, and it will perform the script loading before running the function you pass it. All your other script files will not need to call importScript because it was done here.
If using thread.js, then it will be simpler to add it as a script to the HEAD of each *.html file:
Remove instances of
The modevlib library is a collection of smaller libraries for building charting dashboards. It copies the
import.js
[1] andthread.js
[2] source code, which have their own documentation.[1] https://github.com/klahnakoski/jsImport
[2] https://github.com/mozilla/jsThreads
The text was updated successfully, but these errors were encountered: