Actual hidden properties on HTML elements – what is the correct term?

I've known about this for a while, but I'm not exactly sure what it's called:

var el = document.createElement("p");
el.innerText = "Hello";
el.loremipsum = "TEST STRING"; <-- THIS


If I inspect the DOM, this is what I get:


The loremipsum property is not in the DOM, but:


returns "TEST STRING". What is this property manipulation called? I would like to research it a bit. And yes, I know data attributes are better to use.

Read more here:

Content Attribution

This content was originally published by MortenMoulder at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: