mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #2677 from keepassxreboot/fix/check_element_in_treenode_walker
Fix using custom function with elements in TreeWalker
This commit is contained in:
commit
5f4133e8a3
1 changed files with 3 additions and 1 deletions
|
|
@ -330,7 +330,9 @@ const getShadowDOM = function(elem) {
|
|||
const treeWalkerFilter = function(node) {
|
||||
return !node ||
|
||||
node?.disabled ||
|
||||
(typeof node?.getAttribute !== 'undefined' && node?.getLowerCaseAttribute('type') === 'hidden')
|
||||
(node instanceof Element
|
||||
&& typeof node?.getAttribute === 'function'
|
||||
&& node?.getLowerCaseAttribute('type') === 'hidden')
|
||||
? NodeFilter.FILTER_REJECT
|
||||
: NodeFilter.FILTER_ACCEPT;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue