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

Is it possible to use JS to alter src to data-src on iframe? #179

Open
uglyeoin opened this issue Jul 20, 2019 · 2 comments
Open

Is it possible to use JS to alter src to data-src on iframe? #179

uglyeoin opened this issue Jul 20, 2019 · 2 comments

Comments

@uglyeoin
Copy link

If I want to use this on an iFrame I need to manually rename them all from src to data-src. This should probably be done on document load.

Blazy doesn't work on document load does it? Is there a solution to this?

@dinbror
Copy link
Owner

dinbror commented Nov 9, 2020

@uglyeoin I would do it in the html so you initialize the markup with data-src. But answering you question, yes its possible buy you need to do it as early as possible

@uglyeoin
Copy link
Author

uglyeoin commented Nov 9, 2020

But it is not HTML this is a CMS, so things are load dynamically. I'll see if there is a way to do it earlier in the process.

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