onAttach
Runs once every node of the chain is attached. Runs again only after onDetach. A component that moves into another composition detaches its nodes and attaches them again there; a move within one composition runs neither.
This callback can run before the current composition changes finish applying. Read composition locals in the element's update or layout callbacks to follow those changes; see CompositionLocalConsumerModifierNode.
A throw propagates to the caller applying the modifier and fails the pass; the node is detached first. A throw from onDetach during that detach is suppressed on it, not reported.