Skip to content

Commit 9ebf44e

Browse files
refactor(utils): add properties and methods
that returns another Node
1 parent b0a1157 commit 9ebf44e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

lib/utils.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,27 @@ const ASYNC_UTILS = [
6363
'waitForDomChange',
6464
];
6565

66+
const PROPERTIES_RETURNING_NODES = [
67+
'firstChild',
68+
'lastChild',
69+
'nextElementSibling',
70+
'nextSibling',
71+
'parentNode',
72+
'previousElementSibling',
73+
'previousSibling',
74+
'rootNode',
75+
];
76+
77+
const METHODS_RETURNING_NODES = [
78+
'closest',
79+
'getElementsByClassName',
80+
'getElementsByTagName',
81+
'getElementsByTagNameNS',
82+
'querySelector',
83+
'querySelectorAll',
84+
''
85+
];
86+
6687
export {
6788
getDocsUrl,
6889
SYNC_QUERIES_VARIANTS,
@@ -74,4 +95,6 @@ export {
7495
ALL_QUERIES_COMBINATIONS,
7596
ASYNC_UTILS,
7697
LIBRARY_MODULES,
98+
PROPERTIES_RETURNING_NODES,
99+
METHODS_RETURNING_NODES,
77100
};

0 commit comments

Comments
 (0)