attachShadow on any elements that are not specific built-in elements (body/div/p and a several more), or elements with a hyphen in their names (to indicate it’s a custom element) will throw the error you saw. Simply fix it by putting a hyphen in the name.
IE11 does not support shadowDOM, and the shadyDOM polyfill wont give you everything you expect from a real shadowDOM feature, as it’s impossible to polyfill. So i’d guess scoped support is irrelevant
So this means I cannot use scoped css at all if I have to support IE 11? My problem is that if I use as=“scoped” and @useShadowDOM, the styles are not applied in IE 11, even not in the element itself.
You cannot just enable ShadowDOM on <message> tag.
ShadowDOM has this unintuitive requirement: the tag name must contain at least one dash, you need to name your custom element like <my-message>.
The village naive code here.
Could you not detect browser type/version on load, and just globally load the css there if its an older one, and let it fall through to the scoped in the view if supported?
Not sure if it would double load, or just ignore the scoped, but if it does ignore it then it might work.
I guess the issues is bundling the css all together and running into naming conflicts.
but in AU2 it fails with the dreaded DOMException: Failed to execute 'attachShadow' on 'Element': This element does not support attachShadow error
Care to explain why to someone who’s not a full-time js/ts framework developer?
Btw, even though the error goes away if I comment out the error-queue element nothing from the end-point component gets displayed. Not even the constructor in end-points.ts gets called.
Also, class EndPoints is marked as a custom element like this @customElement('end-point')
Both in end-point and in error-queue I’m referring to a component called status like so: <status></status> (bindings omitted for brevity). This might be the reason why the latter fails. If it is, then I don’t understand why the former don’t fail or perhaps in this case just fails silently.
Sorry for the late reply. I’ve been away on holiday and didn’t see your reply until now.
I believe the issue was solved, because the application is working and has been in use for a while. I can’t remember what the solution turned out to be. Sorry about that.
The issue can be flagged as resolved (if that’s an option )