    }

        // the functions below are from pagedjs utils/dom.js
        nodeAfter(node, limiter) {
          if (limiter && node === limiter) {
            return;
          }
          let significantNode = this.nextSignificantNode(node);
          if (significantNode) {
            return significantNode;
          }
          if (node.parentNode) {
            while ((node = node.parentNode)) {
              if (limiter && node === limiter) {
                return;
              }
              sign