The dataset property of a HTMLElement object returns a DOMStringMap which allows to read and write to/from an HTML element's custom data attributs (i.e. values of attributes whose names start with data-).
The HTML document of the following example has three divs which have the x and y coordinates where they should be positioned in a data-x and data-y attribute.