polyfill-library: [BUG] IntersectionObserver not polyfilled on iOS device
What
I am receiving reports of the following error:
Can't find variable: IntersectionObserver
My polyfill request looks like this: https://polyfill.io/v3/polyfill.js?unknown=polyfill&features=default%2CSymbol%2Cfetch%2CArray.prototype.find%2CIntersectionObserver%2CWeakSet%2Ces2015%2Ces2016%2Ces2017&flags=gated
The user agent string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15
When I call the service with my user agent string spoofed I am receiving the following header in the javascript file:
/* Polyfill service v3.38.0
* For detailed credits and licence information see https://github.com/financial-times/polyfill-service.
*
* Features requested: Array.prototype.find,IntersectionObserver,Symbol,WeakSet,default,es2015,es2016,es2017,fetch
*
* - _ESAbstract.Call, License: CC0 (required by "_ESAbstract.ToPrimitive", "_ESAbstract.ToString", "String.prototype.repeat", "es2015", "_ESAbstract.OrdinaryToPrimitive")
* - _ESAbstract.CreateMethodProperty, License: CC0 (required by "Math.clz32", "es2015", "Math.sign", "String.prototype.repeat")
* - _ESAbstract.Get, License: CC0 (required by "_ESAbstract.OrdinaryToPrimitive", "_ESAbstract.ToPrimitive", "_ESAbstract.ToString", "String.prototype.repeat", "es2015")
* - _ESAbstract.IsCallable, License: CC0 (required by "_ESAbstract.GetMethod", "_ESAbstract.ToPrimitive", "_ESAbstract.ToString", "String.prototype.repeat", "es2015", "_ESAbstract.OrdinaryToPrimitive")
* - _ESAbstract.RequireObjectCoercible, License: CC0 (required by "String.prototype.repeat", "es2015")
* - _ESAbstract.ToInteger, License: CC0 (required by "String.prototype.repeat", "es2015")
* - _ESAbstract.ToObject, License: CC0 (required by "_ESAbstract.GetV", "_ESAbstract.GetMethod", "_ESAbstract.ToPrimitive", "_ESAbstract.ToString", "String.prototype.repeat", "es2015")
* - _ESAbstract.GetV, License: CC0 (required by "_ESAbstract.GetMethod", "_ESAbstract.ToPrimitive", "_ESAbstract.ToString", "String.prototype.repeat", "es2015")
* - _ESAbstract.GetMethod, License: CC0 (required by "_ESAbstract.ToPrimitive", "_ESAbstract.ToString", "String.prototype.repeat", "es2015")
* - _ESAbstract.ToUint32, License: CC0 (required by "Math.clz32", "es2015")
* - _ESAbstract.Type, License: CC0 (required by "_ESAbstract.ToString", "String.prototype.repeat", "es2015", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive")
* - _ESAbstract.OrdinaryToPrimitive, License: CC0 (required by "_ESAbstract.ToPrimitive", "_ESAbstract.ToString", "String.prototype.repeat", "es2015")
* - _ESAbstract.ToPrimitive, License: CC0 (required by "_ESAbstract.ToString", "String.prototype.repeat", "es2015")
* - _ESAbstract.ToString, License: CC0 (required by "String.prototype.repeat", "es2015")
* - Math.clz32, License: CC0 (required by "es2015")
* - Math.sign, License: CC0 (required by "es2015")
* - String.prototype.repeat, License: CC0 (required by "es2015") */
A search in the rest of the file however shows no sign of IntersectionObserver.
It might be related to: https://github.com/Financial-Times/polyfill-library/issues/285
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24 (7 by maintainers)
@JakeChampion Thanks for the effort Jake, this was a tricky one!
From https://github.com/mdn/browser-compat-data/blob/master/browsers/safari_ios.json and wikipedia
@EECOLOR This is the one 😃 https://github.com/Financial-Times/useragent_parser/pull/43