gpt4 book ai didi

google-chrome - 当使用 ShadowDOMv0 的禁用标志打开 chrome 时,开发人员控制台不会打开

转载 作者:行者123 更新时间:2023-12-01 11:15:07 28 4
gpt4 key购买 nike

我的应用是使用 Polymer v1.x 构建的。根据 this Polymer 博客,Chrome 将于 2019 年 3 月弃用 ShadowDOMV0CustomElementsV0HTMLImports。为了测试我的应用程序的行为,我使用了“ --disable-blink-features=ShadowDOMV0"chrome 标志,如 Polymer 博客中所述。

我的应用因这些标志而崩溃,但我无法打开开发人员控制台来检查错误。事实上,即使您使用这些标志在 chrome 中打开任何页面,浏览器也不会打开开发人员控制台。

请注意:我在打开 Chrome 时遇到了类似的问题“--disable-blink-features=CustomElementsV0”。但是,使用 HTMLImports 标志它工作正常。

有没有人遇到过类似的问题?或者,有人对此有任何解决方案吗?

最佳答案

devtools 肯定被这个标志破坏了,它记录了一个错误:

ERROR:CONSOLE(3081)] "Uncaught (in promise) TypeError: element.createShadowRoot is not a function", source: chrome-devtools://devtools/bundled/shell.js (3081)

作为解决方法,您可以远程检查它:Remote debugging with Chrome Developer Tools .

  1. 打开 Chrome 以测试您的网站:Google\Chrome --user-data-dir=/tmp/asdfasdf --disable-blink-features=ShadowDOMV0 --remote-debugging-port=9222

  2. 在另一个 Chrome 实例中,访问 chrome://inspect,您的页面应该出现在“Remote Target #LOCALHOST”下。

关于google-chrome - 当使用 ShadowDOMv0 的禁用标志打开 chrome 时,开发人员控制台不会打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52987679/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com