Skip to content
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

No support for Array.from in IE10 #184

Closed
thany opened this issue Apr 29, 2016 · 3 comments
Closed

No support for Array.from in IE10 #184

thany opened this issue Apr 29, 2016 · 3 comments

Comments

@thany
Copy link

thany commented Apr 29, 2016

The readme says it supports IE9+, but in IE10 I'm getting two unhandled exceptions where it doesn't know about Array.from. Is it possible to rewrite it to use a substitute, so it works in IE10 again?

Afaik, this:

Array.from(...)

Can be rewritten as:

[].slice.call(...)

And it could be refactored to a dead-simple polyfill:

if (!Array.from) { Array.from = function(list) { return [].slice.call(list); }; }

Or similar. Hope this helps :)

@LeaVerou
Copy link
Owner

It says it supports IE9+ when using alongside polyfill.io. For more details, look here: http://blissfuljs.com/#browser-support

Using [].slice.call() instead of Array.from() is against our design goals. Instead, we have hand-picked exactly the polyfills Bliss needs, and you can include them conditionally via polyfill.io.

@thany
Copy link
Author

thany commented Apr 29, 2016

Hm. I kind of disagree there. Even for Edge it wants to include a bunch of polyfills! I thought it was going to be IE10 and lower only... So, here's my reasoning:

  1. I feel the design goal should be to at least natively support the non-fossilized browsers without the need for polyfills. And those browsers do include IE11 and Edge. Polyfills should be for obsolete(-ish) browsers.
  2. These polyfills effectively increase the weight of Bliss by that much. Even for browsers that don't need any polyfills, it adds another request (unless we can magically leave the polyfill request out for those browsers).
  3. On top of that, I don't feel right depending on a third party host for supplying essential functionality, for various reasons. And I can't just "save as" their output, because it's different for each browser.

I sincerely hope you will reconsider this.

@LeaVerou
Copy link
Owner

  1. IE11 is a fossilized browser. It's obsoleted by Edge and will not get any updates.
  2. A design goal of Bliss is to not bloat its core by including polyfill code, as authors can always include the polyfills they want. If you care that much, feel free to only include an Array.from() polyfill manually. It's not exactly a weight increase, since if you use polyfill.io, most browsers will not get the extra weight. We only depend on features that are polyfillable and are already implemented in many browsers, so that it's 100% sure they will eventually be implemented everywhere, so using polyfills is only a transitional step.
  3. Using a third party means that users might already have this cached. If you want to save as, you can use features=blissfuljs|always and save as, but it's wasteful.

We are not going to reconsider this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants