Wednesday, February 12, 2020

The specification for native image lazy-loading is merged into HTML standard


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


from Hacker News https://ift.tt/38nGDcf

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.