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
summary
In an effort to shrink and simplify the V0 Runtime, we'd like to remove viewportCallback. There are three usages of it today:
Maintaining a variable in base-element: inViewport_ and its associated getter isInViewport(). Only used by 5 components.
Used by custom-element for loading indicator support.
Miscellaneous by extensions:
Video VISIBILITY events
amp-3q-player
amp-brightcove
amp-dailymotion
amp-ima-video
amp-mowplayer
amp-nexxtv-player
amp-ooyala-player
amp-powr-player
amp-video
amp-wistia-player
amp-youtube
Ads
a4a, amp-ad-3p-iml: calls viewportCallback in xOriginIframeHandler. May still need to have handler within a4a instead of AmpAdXOriginIframeHandler.
amp-ad-network-doubleclick-impl: subclass of a4a w/ extra handling.
Other
visibility event for 3d gltf.
amp-anim: toggle placeholder to match whether in viewport. also hide if not in vp (style.toggle)
amp-apester-media: toggling placeholder and marking if media has been seen / postMessaging to iframe if so.
base-carousel 0.1: if in viewport, add control hints. also redirect to subclasses onViewportCallback :(
amp-img-slider: similar to base-carousel. just if in viewport then show hints.
amp-timeago 0.1: when enter viewport, reset timestamp
amp-fx-flying-carpet: calls subresources viewportCallback. Indirection will still be necessary considering children are always in vp and need to only pay attn to this element for determining.
unregister callbacks in videos and others
Remove whenInViewport
Remove isLayoutAllowed
Conditions of satisfaction
All traces of viewportCallback removed. A project search for either viewportCallback or this.isInViewport should both yield nothing.
Loading indicator mostly extracted from custom-element.
The text was updated successfully, but these errors were encountered:
summary
In an effort to shrink and simplify the V0 Runtime, we'd like to remove
viewportCallback
. There are three usages of it today:whenInViewport
isLayoutAllowed
Conditions of satisfaction
viewportCallback
orthis.isInViewport
should both yield nothing.The text was updated successfully, but these errors were encountered: