Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

DOMContentLoaded vs load #163

Open
marcusandre opened this issue Sep 29, 2017 · 1 comment
Open

DOMContentLoaded vs load #163

marcusandre opened this issue Sep 29, 2017 · 1 comment

Comments

@marcusandre
Copy link

marcusandre commented Sep 29, 2017

Hi @brandur,

I don't quite understand why this is, but I'm cargo culting for now.main.js

The DOMContentLoaded event is fired when the document has been completely loaded and parsed. Stylesheets, images, and subframes may not be finished loading then. If the load event is fired the page will be fully-loaded and Retina.js can be sure to find some elements with the referenced data-Attribute.

@brandur
Copy link
Owner

brandur commented Sep 29, 2017

Ah, thanks! I'd totally forgotten that I'd written that, hah.

Wouldn't you think that Retina.JS should be able to do its work without waiting for the original (non-retina) images to load?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants