fix improper reporting of internal filter in logger [Firefox]

This commit is contained in:
Raymond Hill 2017-12-31 21:13:46 -05:00
parent ce696e5fbe
commit e675ccf73e
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -204,9 +204,16 @@ vAPI.DOMFilterer.prototype = {
var out = {
declarative: []
};
var selectors;
for ( var entry of this.filterset ) {
if ( all === false && entry.internal ) { continue; }
out.declarative.push([ entry.selectors, entry.declarations ]);
selectors = entry.selectors;
if ( all !== true && this.hideNodeAttr !== undefined ) {
selectors = selectors
.replace('[' + this.hideNodeAttr + ']', '')
.replace(/^,\n|^\n/, '');
if ( selectors === '' ) { continue; }
}
out.declarative.push([ selectors, entry.declarations ]);
}
return out;
},