Add filter to NodeIterator checking for styled nodes

This commit is contained in:
Ulrik de Muelenaere 2017-10-30 19:56:12 +02:00
parent 34b27437d0
commit 3adc2e0f83

View File

@ -99,7 +99,9 @@ window._qutebrowser.stylesheet = (function() {
create_style();
return;
}
var iter = document.createNodeIterator(document);
var iter = document.createNodeIterator(document,
// eslint-disable-next-line no-bitwise
NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_ELEMENT);
var node;
while ((node = iter.nextNode())) {
if (check_style(node)) {