How do I stop plovr from changing DATANAME in elt.dataset.DATANAME?

30 Views Asked by At

I am using plovr (http://plovr.com/) to combine and make JavaScript files smaller. However it changes things like

elt.dataset.DATANAME

to

elt.dataset.e

which of course does not work (and is a bug in plovr, I have just reported this).

How do I work around this bug in plovr?

EDIT: If someone does not know what "dataset" here is then please look here:

HTMLElement.dataset - Web API Interfaces | MDN https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.dataset

1

There are 1 best solutions below

0
On

I think I found a way to protect dataname with plovr externs. It is not generic though. You have to remember to protect each DATANAME you use with dataset. Please see here:

Issue 90 - plovr - plovr changes the names in DOM dataset. https://code.google.com/p/plovr/issues/detail?id=90