Adds onAttach triggerMethod.

Adds `triggerAttach` and `beforeTriggerAttach` triggerMethods.

This is the 3rd out of 3 PRs to get #1886 in.
When i first read this var I thought that it was partially responsible for the implementation strategy, like how to trigger the attach event or something weird. I would generally prefer boolean flags to start with `is` or `should` or something like that... So in this case, maybe `shouldTriggerAttach`