Forum Discussion
JavaScript libaries
Hi Math, Phil
Thanks for the responses both you guys have way better JavaScript skills than me - but I'm still not sure why I wouldn't use the method I'm suggesting:
- You don't need to amend anything in the exported SCORM or drop any files anywhere in my solution either.
- I generally pick up the JavaScript libraries I need dynamically from one of the main library repositories like pkg or NPM or GItHub. I don't think they will be going anywhere soon - a lot of code would fail worldwide if they did!
- If I'm worried that the library might change and amendments could affect my code, then I would include the version number in the url - otherwise I pick up the latest version of the library.
It just seems so much simpler - assuming that there is an ESM version of the library available - obviously not all libraries have converted from cjs to the new standard.
- TilburgTeacherE3 years agoCommunity Member
Both have pluses and minuses. Both work. Both have drawbacks. Mostly depends on the scenario and scripts you need. If those are always the same...and repeats course after course ( eg. using jQuery ) you can use either method.
Pluses WebObject method:- Once setup, it is inherited in the Storyline project and you never need to think about it.
- Copying a default course setup like this...and all libraries are available.
- You can easily create custom libraries or scripts and add them.
- Good extendable.
- As Storyline still is 32bit, its fully compatible with SL
Drawbacks
- When you change something to a folder a WebObject points at, you have to remove the WO from Storlyline and add it again.
Pluses using online sources
- Less code needed to load the libraries
Drawbacks
- As its online, you need a live connection
- As its online, your loading times increase. Can have impact on mobile.
- You dont have control over the sources, for some institutions this is crucial
- As it depends on triggers/urls in SL, you need to ensure they work
- As Storyline is 32 bit not all packages/sources will work
- CORS security can block packages
- To make use of custom scripts you need to upload and maintain them
So i do think this depends on personal preference. But when you work with custom developed scripts ( i do ), the WebObject approach is far better.
Related Content
- 6 months ago