0

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

Leo
  • 4,136
  • 6
  • 48
  • 72
  • 1
    It surely is a bug (since DATANAME have to be preserved). ;-) And I do not think it is the right way to go to undo replacement... What I am asking for is if someone here might understand if there is an option that can make plovr handled this case correctly. I have not looked into plovr documentation for a very long time. And it is a bit complicated so help would be welcome. – Leo Jan 27 '14 at 20:06
  • Good points. I'm removing my previous comment. – Geeky Guy Jan 27 '14 at 20:34

1 Answers1

0

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

Leo
  • 4,136
  • 6
  • 48
  • 72