Is there a way to inherit from the javascript Node interface?

后端 未结 1 1176
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-27 17:55

I want to write some javascript classes which inherit from the DOM Node interface... Sounds very much like how-to-inherit-from-the-dom-element-class, but I do not want to use it

相关标签:
1条回答
  • 2021-01-27 18:19

    It seems to be that this is the closest to my requirements:

    new DOMParser().parseFromString("<root />", "text/xml");
    

    But still no way to inherit from the Node interface.

    0 讨论(0)
提交回复
热议问题