walter-boente_book-collection/js/custom-handler-example-1.js

22 lines
590 B
JavaScript
Raw Normal View History

2026-01-19 22:14:03 +01:00
import { Handler } from '/csspageweaver/lib/paged.esm.js';
export default class myCustomHandler1 extends Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
beforeParsed(content){
// let h2 = content.querySelectorAll('h2');
// h2.forEach( h2 => {
// h2.insertAdjacentHTML("afterbegin", '🍄');
// });
}
afterParsed(parsed) {
console.info("%c [CSS Page Weaver] Example custom handler 1 with afterParsed hook (see js/custom-handler-example-1.js", 'color: green;');
}
}