With the latest version of Chrome Version 80.0.3987.87 (Official Build) (64-bit)
my Angular application has suddenly stopped to work. On troubleshooting the issue found the error "createShadowRoot is not a function" in the console logs.
In several Angular components in our application, we have used ViewEncapsulation strategy Native as below
encapsulation: ViewEncapsulation.Native
It seems that the with the latest version of Chrome, support for Shadow Dom v0 is removed as documented (snip below)
It seems the solution is to replace the ViewEncapsulation strategy from Native to ShadowDom like the below
//encapsulation: ViewEncapsulation.Native
encapsulation: ViewEncapsulation.ShadowDom
Question:
After changing the ViewEncapsulation strategy, my application started to work . The question is,
- Is ViewEncapsulation.ShadowDom a drop in replacement for ViewEncapsulation.Native ? (shadow DOM v0 vs v1)
- Apart of the changing the ViewEncapsulation strategy, anything else I need to change / check?
- What other impacts should I check in my application to ensure that my application works seamlessly
- Any other risks that we should anticipate?
Note : My application is only supported on Google Chrome.