Closed gabrielmontagne closed 7 years ago
@grancalavera ... so far like this goes the var.
There are polyfills for ES5 browsers like element-dataset, so I don't think it is necessary to hack around this.
I'll take it for a spin -- tho... well, let's see : )
Yeah, tried that out, even the one you suggested -- but, as I feared, until JS Proxies are supported -- that is, never for good old IE, there is no way that doing node.dataset.heyPeter = 5
can be turned into <node data-hey-peter="5" />
So, I think, we should bring in this ponyfill in until -- ?
Also, I'd be wary of bringing in a polyfill using proxies. Might be my superstition, but I heard they're slow as hell (is hell slow?)
hell is slow; I've seen it: F12 => Emulation => 10
Description
Makes the grid revert to
data-whatever-attribute
whennode.dataset
is not available.Motivation and Context
The grid doesn't pretend to run everywhere -- it's the responsibility of the app in which this is to be embedded to cater for transpilations, perspirations and polyfillings which, we'd guess, are needed not only for this component.
But while most of the modern JS usage can be fixed at build time using something like
babel-polyfill
, some things remain run time pastimes.At The Office:tm: we had two problems that forced us to lay hands on our pre-compiled code (actually only one main problem, IE10 support, but... )
dataset
incompatibility, which cannot really be addressed "once and for all", but needed to be, sad but true, embedded on the grid.Hence this PR.
Smarter people might find a nicer solution. Please? Anyways, for now, if you don't mind....
How Was This Tested?
To properly test this we created a (still offline) fully webpacked build with polyfills, etc. to run this on IE. Nothing we can easily upload to a block
Types of changes
Checklist: