Ver*_*sen 7 qt qtwebengine angular
最近在一些软件更新(自动 Windows 10 更新,可能还有 Chrome 自动更新)之后,用于从 Qt 的 QWebEngine 进行远程调试的开发人员工具停止工作。JavaScript 控制台显示:
Uncaught TypeError: document.registerElement is not a function
at Object.UI.registerCustomElement (shell.js:formatted:18064)
at shell.js:formatted:18178
at shell.js:formatted:18266
devtools_app.js:formatted:2606 Uncaught ReferenceError: SDK is not defined
at devtools_app.js:formatted:2606
Run Code Online (Sandbox Code Playgroud)
有问题的代码(来自 shell.js)是这样的:
UI.registerCustomElement = function(localName, typeExtension, prototype) {
return document.registerElement(typeExtension, {
prototype: Object.create(prototype),
extends: localName
});
}
Run Code Online (Sandbox Code Playgroud)
什么是 shell.js,它来自哪里?这个问题的原因可能是什么?
该网页实际上是在 Qt 5.12.3 网络浏览器中运行的,但我使用 Chrome(远程)作为开发者工具。
我也同时将 Angular 7.x 升级到 Angular 8,但不再相信这是相关的。
我的 Chrome 当前版本为 80.0.3987.116(官方版本)(64 位)。
更新 我刚刚尝试下载旧版本的 Chromium。(我尝试了 77.0.3823.0 版,因为这可以追溯到 2019 年年中。)并且在那里调试有效。
bai*_*bai 12
Chrome 80 已弃用这些开发工具使用的 WebComponents v0。
解决方案是使用额外的参数启动 Chrome 以重新启用该功能(当它仍在引擎中时):
--enable-blink-features=ShadowDOMV0,CustomElementsV0
Run Code Online (Sandbox Code Playgroud)
或者使用对应于 Chrome 79.x 的 Chromium 版本,例如
Windows: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/706915/
Mac: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/706915/
Linux: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/706915/
Run Code Online (Sandbox Code Playgroud)
请参阅:Chrome devtools 检查器在使用 Samsung TV Tizen Web 应用程序进行调试时显示空白屏幕
归档时间: |
|
查看次数: |
2249 次 |
最近记录: |