Priority: P2: Important
Resolution: Cannot Reproduce
Affects Version/s: 5.12.3, 5.14.0 Beta2
Environment:Anki 2.1.13 (from FlatHub), PyQt 5.12.2, Qt 5.12.3
Anki internally uses a QWebEnginePage with setHtml() to build the page. The HTML looks something like this (lots of stuff omitted):
This is _moduletesta.mjs:
I believe this should print 42 to the console, but it does not. Instead, the inlined script appears to be silently ignored.
Am I doing something wrong here, or is this expected?
- Install Anki from Flathub
- Start Anki with env QTWEBENGINE_REMOTE_DEBUGGING=8080 flatpak run net.ankiweb.Anki
- Import QTBUG-77282.apkg file into Anki, click on deck
QTBUG-77282, click Learn deck
- Visit localhost:8080 in Chrome, click main webview
- Check both cards, one with type="module" and one without. The one without type="module" prints 42 to the console, the one with type="module" doesn't.