Reputation: 10068
I'm currently learning the querySelector method and was surprised to find that it was classified as obsolete
Here is the link to the screenshot
Is querySelector
method really has been obsoleted? If yes, what is the reason? And what method should be used instead?
Upvotes: 3
Views: 1225
Reputation: 14561
The method querySelector
is not obsolete. Obsolete methods are generally highlighted on MDN with a warning like this:
You can see an example here: https://developer.mozilla.org/en-US/docs/Web/API/Document/registerElement
It looks like the list of specifications hasn't been updated on that page. However if you look at the specs on the page for Element.querySelector
, you can find a link to the spec here: https://dom.spec.whatwg.org/#dom-parentnode-queryselector
Upvotes: 1