Open una opened 8 years ago
Yeah, this needs more testing + documentation. Thanks for bringing it up.
I believe it will work fine on most of the mainstream browsers. The only complex features that I can think of are:
Would be nice if this was automatically tested on different browsers. Ideas welcome.
Some thoughts about this:
The library needs Typed arrays and Canvas. These are very basic features and they can't be poly-filled in a performant way. So, I will assume that these two features are available in the browser.
From CanIUse.com, the browser versions that support both TypedArrays
and Canvas
are:
Browser | Version |
---|---|
IE | 11 |
Edge | 14 |
Firefox | 51 |
Chrome | 49 |
Safari | 10 |
Opera | 43 |
iOS Safari | 9.3 |
Opera mini | all |
Android browser | 4.4 |
Chrome for Android | 57 |
These are the versions we can strive to support. That is, if something is missing on these browsers we can try to poly-fill them or use alternatives.
Note: This is a tentative list. If a browser version needs too much working-around, then we might need to skip it.
IE11
doesn't even support XHR.responseType
properly. I encountered it consistently while testing, but the status of the issue seems to be alternating between "can't reproduce" to "won't fix" over the last 4 years.
At this point, I give up on IE11
. So the tentative list of supported browsers is:
Browser | Version |
---|---|
Edge | 14 |
Firefox | 51 |
Chrome | 49 |
Safari | 10 |
Opera | 43 |
iOS Safari | 9.3 |
Opera mini | all |
Android browser | 4.4 |
Chrome for Android | 57 |
I'd suggest leaving off Opera Mini - it runs static pages only, with JS only on the proxy server (under time limits and other restrictions) - so short of actually testing on it you'd never know if it worked - in addition the plan for async processing would be pretty much guaranteed not to work...
Thanks @Rycochet I didn't know it was a crippled browser. From its wikipedia article:
According to the documentation for Opera Mini 4, before the page is sent to the mobile device, its onLoad events are fired and all scripts are allowed a maximum of two seconds to execute. The setInterval and setTimeout functions are disabled, so scripts designed to wait a certain amount of time before executing will not execute at all. After the scripts have finished or the timeout is reached, all scripts are stopped and the page is compressed and sent to the mobile device. Once on the device, only a handful of events are allowed to trigger scripts
Sounds awfully restrictive. So yes, let's scratch Opera mini out.
New tentative list:
Browser | Version |
---|---|
Edge | 14 |
Firefox | 51 |
Chrome | 49 |
Safari | 10 |
Opera | 43 |
iOS Safari | 9.3 |
Android browser | 4.4 |
Chrome for Android | 57 |
Hi, I'm curious which browsers this polyfill supports and can't seem to find much information? I feel like this would be a good addition to the README