dataset vs regular data methods.
Hey, what's the difference between using
The only thing i see with
And for setting them rather than doing
I'd appreciate any info. Thanks in advance.
dataset and regular data methods such as setAttribute? I know there's more to dataset but i can't figure it out.The only thing i see with
dataset is you can list all attribute names and values and have them put in an object but can't you also get attributes with .attributes and .getAttribute?And for setting them rather than doing
element.dataset.xyz = "xyz" can't you use setAttribute ?I'd appreciate any info. Thanks in advance.
