next.js 172 B

1234567
  1. function next(node, selector) {
  2. if (selector && document.querySelector(selector) !== node.nextElementSibling) {
  3. return null;
  4. }
  5. return node.nextElementSibling;
  6. }