Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the javascript linear loaded?

Tags:

javascript

I mean, if the first functions declared are the first functions loaded?

Because, if so, I could add a var loaded = true to the end of the file to know if it is loaded (I know I can use onload, but I would like this alternative also).

like image 513
The Student Avatar asked Jan 28 '26 00:01

The Student


1 Answers

A lot depends on the browser you are using. Depending on your requirements, you might benefit from a script loader. That way you could declaratively define what scripts you wanted to load, and the loader would ensure that they are loaded once. Also, here is a little more information about javascript loading.

like image 103
Bobby D Avatar answered Jan 30 '26 16:01

Bobby D



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!