Re: [w3c/webcomponents] Expose shadowRoot on element internals (#871)

I do agree with @rniwa's suggestion as the minimum change needed to unblock this. That change  is not backwards compatible though... but only breaks for very edge cases, I hope that chrome can take that bullet at this point. Thoughts on that?

As for some extra restrictions, what else can be done? I do remember, vaguely, the discussions about subclassing during tc39 meeting. I just think that the fact all existing components not using internals, but relying on closed shadow root are subject to leaking their implementations details, to be concerning.

> So elements can easily opt out of internals, or call attachInternals() in the constructor to prevent leakage of the shadowRoot.

Moreover, attaching internals is not for free (in terms of perf), now you need to attach internals whenever you use closed shadow as a way to protect yourself even thought you're not going to use the internals object at all, that is also concerning. disabling the internals via the static field is ok for some scenarios, but does not work well when subclassing either since the subclass can revoke the super's definition.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/871#issuecomment-676918809

Received on Thursday, 20 August 2020 03:14:02 UTC