initscript is executed before images have been loaded
See original GitHub issueWhat is says in the title: The function imagesize("image name")
returns [NaN, NaN]
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Is it possible to run javascript before images begin loading?
Javascript loading and execution is serialized by the browser (unless you use something like head.js ), but the problem is that the DOM...
Read more >Javascript wait until all scripts are loaded - Edizioni La Grafica
In plain JS: window. Only when JavaScript is done running all its synchronous code, and is good and ready, will the event loop...
Read more >Img.on(“load”) executes after the img is loaded but before it ...
I've some images, that I want to load by assigning their “data-src” attribute value to theirs “src” attribute and vertically center them after....
Read more >How do I know when controls are fully loaded? - Telerik
The startup script is executed long before the images are loaded. This results in the page 'building' up as it loads images for...
Read more >Document: DOMContentLoaded event - Web APIs | MDN
The DOMContentLoaded event fires when the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another more user-friendly idea would be that
imagesize
waits until the image has been loaded. So running imagesize could block the applet, but in most cases the applets still remain fast and with advanced programming usingimageready
the old behavior could be still used.We could also allow a parameter
lazystart
that manages whether the init script will wait for loading images or not