Change skipped node types to use a switch statement
This commit is contained in:
parent
8195e5109b
commit
8110de514e
@ -87,9 +87,11 @@ class TextSourceRange {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const skip = ['RT', 'SCRIPT', 'STYLE'];
|
switch (node.nodeName.toUpperCase()) {
|
||||||
if (skip.includes(node.nodeName.toUpperCase())) {
|
case 'RT':
|
||||||
return false;
|
case 'SCRIPT':
|
||||||
|
case 'STYLE':
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const style = window.getComputedStyle(node);
|
const style = window.getComputedStyle(node);
|
||||||
|
Loading…
Reference in New Issue
Block a user