VizuaaLOG / BulmaJS

Unofficial javascript extension to the awesome Bulma CSS framework.

Home Page:https://bulmajs.tomerbe.co.uk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support asyncronous load of the library

rodrigoaguilera opened this issue · comments

I am loading BulmaJS from a CDN and using the Bulma global object to interact with the library. I load my scripts and BulmaJS asyncronously so I can't rely on BulmaJS to be available when execute my js.

Solution
At first I thought of some event but those are attached to HTML elements so looked at examples and maybe the best is how Facebook handles it.
https://developers.facebook.com/docs/javascript/quickstart/

with some window.bulmaAsyncInit to load code whenever BulmaJs is ready.

Loading js asyncronous is very interesting for performance.

For now I will use some code like the one suggested here
https://stackoverflow.com/questions/8618464/how-to-wait-for-another-js-to-load-to-proceed-operation

Is this an interesting feature to have in BulmaJS?

Does the section about autoParse help Here

I read that very carefully. I want to avoid using code to check if BulmaJS is loaded and to wait with a setInterval or setTimeout when BulmaJS can handle this

Thank you for the suggestion, this has been implemented and is now in master ready for the 0.12 release. Should you wish to try it out please note master is generally not the most stable, however, documentation can be found within the 'master' section of the documentation.