Adds onAttach triggerMethod.

Adds `triggerAttach` and `beforeTriggerAttach` triggerMethods.

This is the 3rd out of 3 PRs to get #1886 in.
Hmm maybe triggerMethodMany or pull the each up. You don't need the if if triggerMethodOn is smart.