TonyGermaneri / canvas-datagrid

Canvas based data grid web component. Capable of displaying millions of contiguous hierarchical rows and columns without paging or loading, on a single canvas element.
BSD 3-Clause "New" or "Revised" License
1.43k stars 184 forks source link

IE11/ES5 minimum support #349

Open jswolf19 opened 3 years ago

jswolf19 commented 3 years ago

Although support was officially dropped in v0.3.2, errors occur in v0.22.14, so the last version that worked in IE11 is v0.22.12.

In v0.25.1, PR#310 changes the code to ES6 modules. Since IE11 only supports up to ES5, I feel it is no longer practical (or at least not worth the effort) to patch in IE11 support into v0.25.x and v0.3.x . However, patching in fixes up to v0.24.4 is feasible. Versions 0.22.14-0.24.3 could also be patched, but I'm not sure if this would add any value over a single v0.24.4 patch at this time (If other issues come to light with currently-untested paths, then this may be worth looking into more).

I have already created a branch which I have done limited testing on. This could be used for an unofficial patch that one could build locally. I could also create my own release to save others the build step, but it wouldn't be in npm, so there would be some hoops to jump through to use it.

To create an official npm release, I believe the following steps would be necessary.

see also discussion here and here

josh-hemphill commented 3 years ago

It might not hurt to provide a pre-polyfilled bundle (Probably an IIFE bundle) with a caveat that it's only provided for better backwards compatibility; so IE11/Opera Mini would likely work with it, but not explicitly support them. When I can finally get around to fleshing out how to go about the Typescript migration, I'll probably look at including a polyfill bundle anyways, it's just a matter of what target to polyfill to. So depending on how many different bundles is acceptable, there could be a light polyfilled bundle that targets relatively modern browsers, and one that does its best to polyfill to IE11/Opera Mini and takes the hit to the bundle size.

jswolf19 commented 3 years ago

@josh-hemphill considering the lack of issues about support for ES5 despite the fact that support has been broken for over half a year, I'm not sure how much value bundling polyfills would bring. The majority of what I fixed was non-ES5 syntax (arrow functions), so without a conversion to something like Typescript, trying to enforce ES5-compatible syntax would just serve to make contributing more painful for people. Conversion to Typescript should make it much easier to do, as long as compilation to ES5-compatible javascript continues to be supported, but, while I can't speak to Opera (Mini), testability in IE is also not stellar, either.