pre-installations and preparations
This commit is contained in:
1 parent
3e5a0329cb
commit
201d621ac3
6977 files changed
+742826
No files matched your search
+24
@@ -0,0 +1,24 @@
|
||||
import matches from './matches';
|
||||
export default function collectSiblings(node, refNode, selector) {
|
||||
if (refNode === void 0) {
|
||||
refNode = null;
|
||||
}
|
||||
|
||||
if (selector === void 0) {
|
||||
selector = null;
|
||||
}
|
||||
|
||||
var siblings = [];
|
||||
|
||||
for (; node; node = node.nextElementSibling) {
|
||||
if (node !== refNode) {
|
||||
if (selector && matches(node, selector)) {
|
||||
break;
|
||||
}
|
||||
|
||||
siblings.push(node);
|
||||
}
|
||||
}
|
||||
|
||||
return siblings;
|
||||
}
|
||||
Reference in new issue
Block a user