Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support asyncronous load of the library #94

Closed
rodrigoaguilera opened this issue Nov 22, 2019 · 3 comments
Closed

Support asyncronous load of the library #94

rodrigoaguilera opened this issue Nov 22, 2019 · 3 comments

Comments

@rodrigoaguilera
Copy link

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?

@VizuaaLOG
Copy link
Owner

Does the section about autoParse help Here

@rodrigoaguilera
Copy link
Author

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

@VizuaaLOG
Copy link
Owner

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants