On 21/09/2021 16:31, Jacek Caban wrote:
On 9/21/21 2:32 PM, Gabriel Ivăncescu wrote:
But where would we even get the name from? In HTMLElement_Create, get_tag_desc is used for specific tags, which is similar, but the "fallback" goes to HTMLGenericElement_Create, since not all tags are included there.
Sure, but I think that's what you need, see this test for an example:
var s = document.createElement("winetest").toString(); ok(s === "[object HTMLUnknownElement]", "s = " + s);
For example the "div" tag is not.
It should probably be made a separated object.
Thanks,
Jacek
Ok, I tested all the tags from:
https://www.w3schools.com/TAGS/default.ASP
It looks like there's way too many tags to properly implement each as separate object just for this. Rather, since Gecko handles them, how about something like the attached diff?
It's also easily extended if needed.