From 3adc2e0f83bbba3c7b6db0619f2ee2ae90703db2 Mon Sep 17 00:00:00 2001 From: Ulrik de Muelenaere Date: Mon, 30 Oct 2017 19:56:12 +0200 Subject: [PATCH] Add filter to NodeIterator checking for styled nodes --- qutebrowser/javascript/stylesheet.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qutebrowser/javascript/stylesheet.js b/qutebrowser/javascript/stylesheet.js index e363d296f..384138f2f 100644 --- a/qutebrowser/javascript/stylesheet.js +++ b/qutebrowser/javascript/stylesheet.js @@ -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)) {