Detaches every share button this capability injected (teardown counterpart of
appendShareButtonToTabs).
Queries the whole document rather than a caller-supplied strip on purpose: the
button is injected into a container the capability does NOT own, from two
different entry points (the tabs-ready seam and the init() catch-up), and a
teardown must not depend on the caller still holding the right strip. .gl-rp-share-btn
is the capability's own class, so the selector cannot claim anything else.
Removing the element is also what releases its click listener — the listener is a
closure with no handle to unsubscribe with, and it dies with the node.
Detaches every share button this capability injected (teardown counterpart of appendShareButtonToTabs).
Queries the whole document rather than a caller-supplied strip on purpose: the button is injected into a container the capability does NOT own, from two different entry points (the
tabs-readyseam and theinit()catch-up), and a teardown must not depend on the caller still holding the right strip..gl-rp-share-btnis the capability's own class, so the selector cannot claim anything else.Removing the element is also what releases its click listener — the listener is a closure with no handle to unsubscribe with, and it dies with the node.