This gets prototype/constructor hierarchy right, but there is more work needed to get it fully right (the same is true for some other objects as well, to lesser extend). Comment and document fragment nodes should not expose element/document properties, attribute nodes should be actual nodes and legacy unknown elements seem to be some parser quirk (so `use_generic` is not exactly right even in legacy modes).