get data attributes
Use dataset property to return an object containing all data attributes set on the element. You can also get value of a particular data attribute by using dot notation and referencing the unique name part of the attribute.
copy