Removed test code and modified a comment
Uses transitionend event to resolve a promise before continuing through the layout pipeline