Upasana
Upasana

Reputation: 1975

Developer console does not open when chrome is opened with disabled flags for ShadowDOMv0

My app is built using Polymer v1.x. As per this Polymer blog, Chrome is deprecating ShadowDOMV0, CustomElementsV0 and HTMLImports in March 2019. To test the behavior of my app I have used "--disable-blink-features=ShadowDOMV0" chrome flag as stated in the Polymer blog.

My app crashes with these flags but I am not able to open the developer console to check the error. Infact, even if you open any page in chrome with these flags, browser does not let open the developer console.

Please note: I have experienced similar issue when I opened Chrome with "--disable-blink-features=CustomElementsV0". However, with HTMLImports flag it works fine.

Does anyone experience similar issue? Or, does anyone have any solution for this?

Upvotes: 3

Views: 1244

Answers (1)

Josh Lee
Josh Lee

Reputation: 177564

The devtools sure are broken with this flag, and it logs an error:

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

As a workaround, you can inspect it remotely: Remote debugging with Chrome Developer Tools.

  1. Open Chrome to test your site in: Google\ Chrome --user-data-dir=/tmp/asdfasdf --disable-blink-features=ShadowDOMV0 --remote-debugging-port=9222

  2. In a different instance of Chrome, visit chrome://inspect, and your page should appear under “Remote Target #LOCALHOST”.

Upvotes: 5

Related Questions