Push key entries into a rule array on container and return a cleanup
function that releases the references this call took.
One rule per key, reference counted: the rule is removed only when the last
holder releases it. Removing it on the first cleanup let one caller's unbind
strip a rule another caller still needed, and assigning a filtered copy of
the array captured at call time resurrected entries a later cleanup had
already removed.
Used by allowModal, penetration, and stop to
eliminate the repeated bookkeeping pattern across focus-target and
layer-level branches.
Push key entries into a rule array on
containerand return a cleanup function that releases the references this call took.One rule per key, reference counted: the rule is removed only when the last holder releases it. Removing it on the first cleanup let one caller's unbind strip a rule another caller still needed, and assigning a filtered copy of the array captured at call time resurrected entries a later cleanup had already removed.
Used by
allowModal,penetration, andstopto eliminate the repeated bookkeeping pattern across focus-target and layer-level branches.