Crashes when processing XHTML document with a style tag
$ cat test.xhtml
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
<style type="text/css"></style>
</head>
<body>
<p>OK.</p>
</body>
</html>
$ PUPPETEER_EXECUTABLE_PATH=`which chromium` ./node_modules/.bin/pagedjs-cli test.xhtml -o test.pdf
◴ Loading: test.xhtml
Puppeteer old Headless deprecation warning:
In the near feature `headless: true` will default to the new Headless mode
for Chrome instead of the old Headless implementation. For more
information, please see https://developer.chrome.com/articles/new-headless/.
Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.
◴ Loading: test.xhtmlError: Evaluation failed: ProgressEvent
at ExecutionContext._ExecutionContext_evaluate (file:///home/hugo/Downloads/xoq1/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:254:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (file:///home/hugo/Downloads/xoq1/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:143:16)
at async Printer.render (file:///home/hugo/Downloads/xoq1/node_modules/pagedjs-cli/src/printer.js:199:4)
at async Printer.pdf (file:///home/hugo/Downloads/xoq1/node_modules/pagedjs-cli/src/printer.js:267:14)
at async file:///home/hugo/Downloads/xoq1/node_modules/pagedjs-cli/src/cli.js:165:10
pagedjs 0.4.1
pagedjs-cli 0.3.4
Chromium 109.0.5414.74