Is it possible to make querySelectorAll live like getElementsByTagName?

前端 未结 2 767
死守一世寂寞
死守一世寂寞 2021-02-07 12:59

getElementsByTagName() has 2 great features: it is fast and it is live. But what if I want to get p strong. Of course I could refine a selection using

2条回答
  •  别跟我提以往
    2021-02-07 13:48

    I don't think it is possible because subsequent changes of the DOM does not reflect in the NodeList object returned by the querySelectorAll() method.

    Selectors-api W3C

提交回复
热议问题