The $nodesOfType function is no longer used internally, and does not support node overrides. Generally it was used to work around registerMutationListener not having an initialization phase, but that changed in #6357, so it's no longer useful and generally just causes bugs.
This function should be marked @deprecated with a comment that tells them to use registerMutationListener instead, or to remove their explicit legacy initialization for a mutation listener.
Impact
Using this function causes bugs in apps that use node overrides, we should discourage its use and eventually remove it.
Hello, I'm a student from UTFPR in Brazil, and I'm taking a class where I need to contribute to open source issues. I would like to know if I can take on this issue to work on.
Description
The
$nodesOfType
function is no longer used internally, and does not support node overrides. Generally it was used to work aroundregisterMutationListener
not having an initialization phase, but that changed in #6357, so it's no longer useful and generally just causes bugs.This function should be marked
@deprecated
with a comment that tells them to useregisterMutationListener
instead, or to remove their explicit legacy initialization for a mutation listener.Impact
Using this function causes bugs in apps that use node overrides, we should discourage its use and eventually remove it.