mirror of https://github.com/gorhill/uBlock.git
Fix regression in DOM inspector
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1765
Related commit:
- 1285f78e05 (diff-77e1325098616e4d2bb6b1e9ccf3b7cb9898942739e29f01b63346220f55b2b8L250-R250)
This commit is contained in:
parent
d508d34c0a
commit
c7f1af9547
|
@ -232,7 +232,7 @@ const domLayout = (function() {
|
|||
};
|
||||
|
||||
const domNodeFactory = function(level, node) {
|
||||
var localName = node.localName;
|
||||
const localName = node.localName;
|
||||
if ( skipTagNames.has(localName) ) { return null; }
|
||||
// skip uBlock's own nodes
|
||||
if ( node.classList.contains(sessionId) ) { return null; }
|
||||
|
@ -245,14 +245,14 @@ const domLayout = (function() {
|
|||
// Collect layout data.
|
||||
|
||||
const getLayoutData = function() {
|
||||
var layout = [];
|
||||
var stack = [];
|
||||
var node = document;
|
||||
var domNode;
|
||||
var lvl = 0;
|
||||
const layout = [];
|
||||
const stack = [];
|
||||
let lvl = 0;
|
||||
let node = document.documentElement;
|
||||
if ( node === null ) { return layout; }
|
||||
|
||||
for (;;) {
|
||||
domNode = domNodeFactory(lvl, node);
|
||||
const domNode = domNodeFactory(lvl, node);
|
||||
if ( domNode !== null ) {
|
||||
layout.push(domNode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue