Question

I'm developing a custom Dojo widget which in fact acts as a wrapper for Timeline JS library (http://www.simile-widgets.org/timeline/).

Is there a possibility to include the required JS code for Timeline in the custom dojo widget or must I include manually in my "index.html"??

Thanks in advance.

Était-ce utile?

La solution

Do you have control over the Timeline source code, that is, are you hosting it yourself?

If this is the case you could turn the dependency into a dojo module by inserting an appropriate dojo.provide call on the top or you could just straight up copy-and-paste everything inside your MyWidget.js source file.


If this is all ends up too compicated for you to consider it worth it, adding the script tag by hand on the index.html is not that bad (given how base Javascript actually doesn't have a real module system you could use instead)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top