-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Cleanup INTERSECTION_OBSERVER_POLYFILL experiment #28929
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo! 🎉 🎉
@@ -14,9 +14,6 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
// TODO(#27807): Remove polyfill part InOb polyfill has been launched. But the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth changing the IntersectionObserverHostApi
, IntersectionObserverHostForAd
class later on, also the file name to be more clear : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. But I think it still covers more than ads. It's more of a "legacy 3p intersection observer host support".
Hey @danielrozenberg! These files were changed:
|
/cc @zhouyx This is to be deferred until the resolution for the "friendly inabox" case. |
Ok, the last issue has been resolved. I'm restoring this pull request. |
🎉 🎉 Woohoo! @micajuine-ho fyi |
@@ -586,9 +586,6 @@ export class AmpAdXOriginIframeHandler { | |||
* @param {boolean} inViewport | |||
*/ | |||
viewportCallback(inViewport) { | |||
if (this.intersectionObserverHost_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likely the removal of this code might have caused issue: #29759
@dvoytenko was it intended to remove this?
@@ -596,13 +589,6 @@ export class AmpIframe extends AMP.BaseElement { | |||
return true; | |||
} | |||
|
|||
/** @override */ | |||
viewportCallback(inViewport) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I can confirm that IntersectionObserverHostApi
is working as expected.
We are using the native IntersectionObserver within the IntersectionObserverHostApi
so viewportCallback is no longer needed.
Also for legacy reason, IntersectionObserverHostApi
sends update whenever there's an intersection change, but IntersectionObserverHostForAd
sends update whenever there's a position change when the element is within the viewport.
we should migrate to using native IntersectionObserver to replace viewportCallback
for IntersectionObserverHostForAd
as well.
* Cleanup INTERSECTION_OBSERVER_POLYFILL experiment * remove additional polyfilling code * additional polyfill cleanup * fix lints * cleanup * cleanup more tests * fix sourcemaps * cleanup FIE legacy mode
Closes #27807.
TODO