-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Lazyload images #3752
Merged
Merged
Lazyload images #3752
Commits on Jan 27, 2020
-
Addressed Domenic's comments" Various nits and cleanups: - Remove "lazyload hint" concept and refer instead to states of the attribute directly - IDL attribute casing should be lazyLoad, not lazyload - Be a bit more precise in the iframe processing model - Remove domintro for reflecting attributes (both this one and the one added for img.decoding, erroneously) Updated metadata fetch algorithm Addressed comments Referred to add a range header Addressed nit Source formatting nits Added info about how to handle range response Addressed some comments from domenic Addressed remaining comments from domenic and others Addressed more comments from Domenic Editorial tweaks Avoid potential race condition by saving corsState and origin Have an explicit "el" variable Previously it was sometimes implicit, sometimes "the img element", sometimes "the element"... DRY up the code a bit with a "document" variable Since a document's origin can never change, this is safe to do. Upon re-reading, moving this sentence up seems clearer Changed to load=lazy|eager|auto Wait for the element to be in the active document. Attribute renamed as 'loading' and added intersection observer algo Addressed more comments Images created by the NamedConstructor should be eager by default Yank 'fetch image metadata' + small fixes Revert 'Images created by the NamedConstructor should be eager by default' Properly link to IntersectionObserver Always invoke updating-the-image-data algorithm This commit removes the option to defer updating-the-image-data based on the loading attribute's state, and instead invokes it unconditionally. Then, instide the updating-the-image-data algorithm, the UA can optionally continue fetching the image normally, or wait until the image intersects with the viewport, or the loading attribute changes values. Add privacy fingerprinting notes + remove superfluous link Small fixes Move deferral of image loading after request is made Editorial: Attempt to fix Travis build updating-the-image-data should not await a stable state Rebase * Updating-the-image-data cannot be called while in-parallel Fix rebase mistake (loadstart event) Refactor lazy loading conditions for images Limit invocations of compute the intersection Remove the <iframe> bits Stop referring to the lazy load attribute as a hint Introduce lazy loading mode abstraction Remove newlines Remove auto + lazy loading mode abstraction, explicitly delay the load event, reformat lazy loading conditions Fix backwards logic with delaying the load event Formatting Easy stuff... Remove IO dependency, note larger intersection areas than viewport Add lazy load example with loading explanation, and dev note Fix error from removing compute-the-intersection Address reviews Address nits + move dfn intersect the viewport
Configuration menu - View commit details
-
Copy full SHA for 1858de4 - Browse repository at this point
Copy the full SHA 1858de4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 304f9ba - Browse repository at this point
Copy the full SHA 304f9baView commit details
Commits on Feb 4, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0a18230 - Browse repository at this point
Copy the full SHA 0a18230View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ffdbd8 - Browse repository at this point
Copy the full SHA 4ffdbd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f7f203 - Browse repository at this point
Copy the full SHA 9f7f203View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27d5aca - Browse repository at this point
Copy the full SHA 27d5acaView commit details
Commits on Feb 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for d32f8e8 - Browse repository at this point
Copy the full SHA d32f8e8View commit details
Commits on Feb 7, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 8bac3c8 - Browse repository at this point
Copy the full SHA 8bac3c8View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.