mikemaccana / outdated-browser-rework

Detects outdated browsers and advises users to upgrade to a new version. Handles mobile devices!
MIT License
226 stars 63 forks source link

Uint8Array (added by browserify) doesn't work in IE < 10 #41

Closed akkie closed 6 years ago

akkie commented 6 years ago

IE < 10 doesn't support Uint8Array. It throws an exception at outdated-browser-rework.min.js, Row: 1, Column: 17431.

Buffer.prototype.__proto__=Uint8Array.prototype;

It shows also the message: This browser lacks typed array (Uint8Array) support which is required by buffer v5.x. Use buffer v4.x if you require old browser support.

mikemaccana commented 6 years ago

A git grep Uint shows this isn't in the actual source but is being added by browserify. We need to fix, but on the browserify level.

glomotion commented 6 years ago

+1. Would love to see a fix for this.

mikemaccana commented 6 years ago

@glomotion Have you sent a PR?

glomotion commented 6 years ago

Heh. Browserify's definitely not my bag - It's black magic IMO. I could maybe help get a webpack build process together. But thing is, these build tools spit out code for modern browsers. I suspect we'd have the same problem with Webpack. A quick google of the issue makes me think a typed array polyfill might do the job. Ill try it out and submit a PR if it works.

Huulivoide commented 6 years ago

The correct thing to do would be to use custom version of 'deep-extend'. We do not need support for extending arrays of any kind nor do we need any support for extending Buffers either. deepe-extend pulls in all sorts of crap turning this whole thing into a 41KB behemoth.

Will submit pull request soon.

mikemaccana commented 6 years ago

Thanks Jesse!

On Tue, 23 Oct 2018 at 12:42 pm, Jesse Jaara notifications@github.com wrote:

The correct thing to do would be to use custom version of 'deep-extend'. We do not need support for extending arrays of any kind nor do we need any support for extending Buffers either. deepe-extend pulls in all sorts of crap turning this whole thing into a 41KB behemoth.

Will submit pull request soon.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mikemaccana/outdated-browser-rework/issues/41#issuecomment-432212398, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKiMiRfeyvOCFR_r1169HbW4my6GpP8ks5unwCJgaJpZM4UkOwk .