1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Check childElementCount directly. (#2725)

This commit is contained in:
Sean Stangl 2017-06-21 17:09:19 -07:00 committed by Raymond Hill
parent ab5580db67
commit 88fcf53d34

View File

@ -1232,7 +1232,7 @@ vAPI.domCollapser = (function() {
if ( node.localName === 'iframe' ) {
addIFrame(node);
}
if ( node.children && node.children.length !== 0 ) {
if ( node.childElementCount > 0 ) {
var iframes = node.getElementsByTagName('iframe');
if ( iframes.length !== 0 ) {
addIFrames(iframes);