I discovered that the source of a bug in some code I was writing was because of a native property on the window object called Entity (obviously accessible via window.Entity). I’ve since worked around the problem by not calling my thing “Entity”, but I was wondering what the hell is that property?
I discovered that the source of a bug in some code I was writing
Share
I believe it’s just the constructor for Entities, which can be used in the same manner as window.Element. It seems like the user can’t define new entities or elements, only the browser itself when it renders the page.
http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-527DCFF2
window.Entity.prototype.__proto__contains these:And as to what types of entities there are, just look at the HTML DTD and you’ll see a bunch of entities defined: http://www.w3.org/TR/html4/sgml/dtd.html
Background info on entities: