You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some web components with shadowDOM use focus-visible polyfill.
We apply applyFocusVisiblePolyfill when the component is attached to the DOM connectedCallback().
When the component is removed, applyFocusVisiblePolyfill keep a reference of it preventing it to be garbage collected.
So each web-component added then removed are kept in memory and it can make a huge memory leak.
Potential solution: provide a function to unapply to remove all event listener set by applyFocusVisiblePolyfill at disconnectedCallback.
Hi @rafael-leal-mccormack and @ryuran, unfortunately we don't have the bandwidth to work on this right now, but would gladly accept and review a PR if someone wanted to take the time to make one.
We are not planning any updates to this polyfill because focus-visible is now supported in all browsers, and those browsers have all moved to an evergreen model. I would be curious to know if you and @ryuran feel like you can move off of the polyfill, and if not, why?
Hello.
Some web components with shadowDOM use focus-visible polyfill.
We apply
applyFocusVisiblePolyfill
when the component is attached to the DOMconnectedCallback()
.When the component is removed,
applyFocusVisiblePolyfill
keep a reference of it preventing it to be garbage collected.So each web-component added then removed are kept in memory and it can make a huge memory leak.
Potential solution: provide a function to
unapply
to remove all event listener set byapplyFocusVisiblePolyfill
atdisconnectedCallback
.More info on memory Leaks https://www.youtube.com/watch?v=YDU_3WdfkxA
The text was updated successfully, but these errors were encountered: