Adds onAttach triggerMethod.

Adds `triggerAttach` and `beforeTriggerAttach` triggerMethods.

This is the 3rd out of 3 PRs to get #1886 in.
Let's listen for the attach event. 

Spying on triggerAttach smells of implementation. And less of contract