Cannot read property 'getBoundingClientRect' of undefined
I'm not sure what is happening but the following error is thrown:
Uncaught (in promise) TypeError: Cannot read property 'getBoundingClientRect' of undefined
at Page.addResizeObserver (quarkus-cheat-sheet.html:1799)
at Page.addListeners (quarkus-cheat-sheet.html:1761)
at Page.layout (quarkus-cheat-sheet.html:1715)
at async Chunker.layout (quarkus-cheat-sheet.html:2506)
at async Chunker.renderAsync (quarkus-cheat-sheet.html:2429)
As a result the document is truncated/incomplete. Please note that when using a headless browser, I'm able to generate a complete PDF. So it might be a "concurrent exception" when the document is opened in a non-headless browser. Just to be clear, I do not scroll when Page.js is running, I just open the page in a browser.
If I add the following condition:
let wrapper = this.wrapper;
if (!wrapper) {
return;
}
Then another exception is thrown:
quarkus-cheat-sheet.html:1776 Uncaught (in promise) TypeError: Cannot read property 'addEventListener' of undefined
at Page.addListeners (quarkus-cheat-sheet.html:1776)
at Page.layout (quarkus-cheat-sheet.html:1715)
at async Chunker.layout (quarkus-cheat-sheet.html:2509)
at async Chunker.renderAsync (quarkus-cheat-sheet.html:2432)