Background
I’m using the webview inspector addon and noticed there is a Lighthouse feature to test Performance, Accessibility, Best Practices, SEO and PWA.
I never used such tools and am more of a novice programmer but i’d like to see what the report could give me – especially regarding performance, accessibility and best practices.
What I did
- I open my card in the previewer (and in second try in the template editor)
- Right click → Inspect.
- Go to Lighthouse.
- Press analyze page load.
Result
It loads while claiming “Auditing 127.0.0.1…” and then fails with the following:
The page in the previewer and template editor gets blank during this run. I also had the browser window in the foreground at all times.
Inspecting webview after lighthouse run
After running lighthouse (anki page being blank) I can see that the body shows this:
<div id="qa"></div>
That’s not right though as this div normally would contain the card content.
Simply closing and opening the previewer (or switching from front preview to back preview in the template editor) makes the card content reappear again.
Desired result
I’d like to be able to generate an actual report with the addon.
Question
How can I properly generate this lighthouse report using the webview inspect addon?