[GIT-PULLS] [php-src] PR #23501: dom: invalidate node list caches on class attribute mutations
[email protected] (iliaal)
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <[email protected]> |
Pull Request: https://github.com/php/php-src/pull/23501 Author: iliaal Mutating an element class through the reflected className property, classList mutations, or removeAttribute(), removeAttributeNS() and removeAttributeNode() modified the underlying attribute without bumping the document cache tag, so live collections such as getElementsByClassName() kept returning stale lengths and items afterwards. Each of these mutation points now invalidates the node list caches with php_libxml_invalidate_node_list_cache(). Attr::$value, setAttributeNode and setAttributeNS were audited and already invalidate correctly.