You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some embed providers use <iframe> for loading of their content, but other use plain HTML or iframe followed by <script src>. Most notable example is Twitter, but there are others like Tumblr, Vine, Instagram...
This means that their JavaScript file is loaded and <iframe> created while loading page and lazy loading is not working for them. In my commit dimadin/bj-lazy-load@5bf81af, I showed how this can be done for Twitter, but this is not practical because all sources must be manually defined and they can change.
What can be done is to do some regex to find script source, then replace that <script> tag with placeholder image, while JavaScript can stay the same or similar as in my commit. The only question is what to do if script has more attributes.
Other option is to put some trigger in your JavaScript file so that I don't need to edit that file after updates.
The text was updated successfully, but these errors were encountered:
Some embed providers use
<iframe>
for loading of their content, but other use plain HTML or iframe followed by<script src>
. Most notable example is Twitter, but there are others like Tumblr, Vine, Instagram...Here is a Twitter example:
This means that their JavaScript file is loaded and
<iframe>
created while loading page and lazy loading is not working for them. In my commit dimadin/bj-lazy-load@5bf81af, I showed how this can be done for Twitter, but this is not practical because all sources must be manually defined and they can change.What can be done is to do some regex to find script source, then replace that
<script>
tag with placeholder image, while JavaScript can stay the same or similar as in my commit. The only question is what to do if script has more attributes.Other option is to put some trigger in your JavaScript file so that I don't need to edit that file after updates.
The text was updated successfully, but these errors were encountered: