import { Handler } from '/csspageweaver/lib/paged.esm.js';

export default class myCustomHandler1 extends Handler {
    constructor(chunker, polisher, caller) {
        super(chunker, polisher, caller);
        this.num = 0;
      }

      

      afterPageLayout(pageElement, page, breakToken){
        if(pageElement.classList.contains("pagedjs_carnet_page")){
  
          let pagebox = pageElement.querySelector(".pagedjs_pagebox");
          var div = document.createElement('div');
          div.classList.add("carnet-img");
          div.innerHTML = '<img src="/images/carnet-img.png" style="object-position: -' + this.num + 'px 0px">';
          pagebox.appendChild(div);
          this.num = this.num + 10;
        }
      }



}


