Created
September 5, 2013 23:54
-
-
Save jrburke/6457819 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_waitForTransitionEnd: function(cardId) { | |
var client = this.client; | |
client.waitFor(function() { | |
var condition = false; | |
client.executeScript( | |
function() { | |
var Cards = window.wrappedJSObject.require('mail_common').Cards, | |
card = Cards._cardStack[Cards.activeCardIndex], | |
cardNode = card && card.domNode; | |
return cardNode && cardNode.dataset.type === cardId && | |
!Cards._eatingEventsUntilNextCard; | |
}, | |
function(error, result) { | |
if (result === true) { | |
condition = true; | |
} | |
} | |
); | |
return condition; | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment