The data attribute method is immediately what came to mind when I was reading the beginning of the article and it was referencing a hidden attribute. It seems much cleaner to me to pass the data through a data channel, rather than through the content of an element which then relies on CSS to remain hidden. Although it does require slightly (or more, depending on payload) space to escape correctly.