GoogleChromeLabs/quicklink
Consider adding `rootMargin` to the Intersection Observer
オープン
#14 opened on 2018/12/10
enhancementgood first issuehelp wanted
Repository metrics
- Stars
- (11,269 個のスター)
- PR merge metrics
- (PR metrics pending)
説明
Feedback from @surma:
I feel like by default you should add a rootMargin to the IO to trigger the load before something comes into the viewport.
So, rootMargin defaults to "0px 0px 0px 0px", meaning the intersection will be computed between the root element's unmodified bounds rectangle and the target's bounds. This change would be made to https://github.com/GoogleChromeLabs/quicklink/blob/master/src/index.mjs#L21