page.js icon indicating copy to clipboard operation
page.js copied to clipboard

browser support

Open jonathanong opened this issue 10 years ago • 5 comments

going to drop support for basically all non-modern browsers like < IE 10 and expect devs to include polyfills.

  • expect them to use the History polyfill
  • some sort of .addEventListener() polyfill

jonathanong avatar Jul 08 '14 03:07 jonathanong

I used to like this idea. Now, not so much. I just spent the last week debugging and patching IE8 issues that are caused by shimming addEventListener, and these are not easy issues to debug, especially considering that the issues show up in 3rd party libraries that I'm not familiar with.

Many libs have event handling logic that tries to use addEventListener and falls back to other methods, but it is not possible to fully support all the features of addEventListener (for example, capturing) in IE8. In addition, I think the lib developers also assume that if addEventListener exists then it's not running in IE8 so they can get away with some shortcuts. Adding the shim breaks these libraries.

If you could just include a few more lines of code to fallback to attachEvent when addEventListener doesn't exist that would sure save me a lot of trouble.

spudly avatar Dec 03 '14 19:12 spudly

Same issue as @spudly ... Seems that if I add a standard polyfill for addEventListener my JS is breaking elsewhere. This pretty much means I cannot use page.js unless I tweak the library code, it seems.

davidtheclark avatar Dec 08 '14 21:12 davidtheclark

Also the use of Array.isArray in page.js necessitates the use of a polyfill below ie9.

if(!Array.isArray) {
  Array.isArray = function (vArg) {
    return Object.prototype.toString.call(vArg) === "[object Array]";
  };
}

source

notno avatar Dec 12 '14 11:12 notno

So turns out the section of the Readme on IE8 is inaccurate, huh? https://github.com/visionmedia/page.js#support-in-ie8

Even if Page is not going to be useful in IE8 it would be great to have an accurate statement about that, to give devs an accurate picture of what they're getting into.

davidtheclark avatar Dec 12 '14 14:12 davidtheclark

I hit the same stone with IE8 support. It would be great to have a clear documentatio section stating the recommended way of using page.js in projects which need to run in older Internet Explorer versions.

PaquitoSoft avatar Jan 13 '15 15:01 PaquitoSoft