github / catalyst

Catalyst is a set of patterns and techniques for developing components within a complex application.
https://github.github.io/catalyst/
MIT License
1.34k stars 50 forks source link

use shadowroot.host instead of weakmap #284

Closed keithamus closed 1 year ago

keithamus commented 2 years ago

When working on this code I realised we're using a WeakMap to store references to controllers that own shadowRoots, however we can use .host to get the owner of a ShadowRoot, avoiding the need for a WeakMap.

primer-css commented 1 year ago

:wave: Hello and thanks for pinging us! This issue or PR has been added to our inbox and a Design Infrastructure first responder will review it soon.