I'm facing the problem that Puppeteer does not load resources specified with relative path (e.g. background.png in image src or css url()).
So that then I load content of the local file using setContent() the result is very different from then I do the same but using goto(file://).
Apparently, then one uses 'setContent()' the page stays at 'about:page' with prevents resources with relative paths to load. I wonder if there any way to specify document location and load content from the string?
I would use goto but I need to pre-process the html first with Handlebar.
For now, I do the following:
await page.goto(framePath);
let content = await page.content();
//Preprocess content here
await page.setContent(processedContent);
but it does not feel right, and I wonder if the is a better solution.