8 lines
172 B
JavaScript
8 lines
172 B
JavaScript
|
function next(node, selector) {
|
||
|
if (selector && document.querySelector(selector) !== node.nextElementSibling) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return node.nextElementSibling;
|
||
|
}
|