T
Tim Streater
I just wasted an hour until I remembered that the dataset variables in
HTML5 have to be integers. Anyone know why there is this limitation?
I had ptr as a pointer to an <li> element, and couldn't figure out why:
if (ptr.dataset.myflag==true) return;
was not being executed even though myflag had been set to true earlier
(and I used console.info() to confirm it). All started to work as
expected when I changed to use 0 and 1 instead of false and true.
HTML5 have to be integers. Anyone know why there is this limitation?
I had ptr as a pointer to an <li> element, and couldn't figure out why:
if (ptr.dataset.myflag==true) return;
was not being executed even though myflag had been set to true earlier
(and I used console.info() to confirm it). All started to work as
expected when I changed to use 0 and 1 instead of false and true.