This is a refinement to an earlier JSONp handler where I ran into an issue with accessing the response data due to timing. By passing the resolve and reject behaviours to the "then" method the new promise the data object returned in the callback is accessible. http://www.html5rocks.com/en/tutorials/es6/promises/
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
<html> | |
<head> | |
</head> | |
<body> | |
<div id='wrapper'> | |
</div> | |
</body></html> |