![]() The iframe will load the polyfill and configure it by calling the.Intersection data to the iframe via messaging. For each IntersectionObserverEntry for the iframe it will forward It can either use the this polyfill or any otherĪpproach. The host will setup its own IntersectionObserver instance for theĬross-origin iframe element.The host and iframe will establish a messaging channel.Cross-origin iframesĪdditional code and configuration are required to support cross-origin iframes, ![]() Same-origin iframes are supported by the polyfill out of the box. This is recommended in cases where the DOM will update frequently but you know those updates will have no effect on the position or your target elements. USE_MUTATION_OBSERVER = false // Globally // for an instance var io = new IntersectionObserver ( callback ) io. To enable polling for all instances, set a value for POLL_INTERVAL on the IntersectionObserver prototype: This can be set either globally or on a per-instance basis. If you need to handle any of these use-cases, you can configure the polyfill to poll the document by setting the POLL_INTERVAL property.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |