Last active
December 27, 2017 14:05
-
-
Save hugollm/007e95d44892a2aeb65b83605b9d5ebb to your computer and use it in GitHub Desktop.
Pseudo code showing how to open a popup "assinchronously" without being blocked by the browsers
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
// The idea is to load a placeholder popup right after the click | |
// and then redirect it later to the real location. | |
// on click | |
let popup = showPlaceholderPopup('Loading...'); | |
api.get('/obtain-the-real-url').then(url => { | |
popup.location.href = url; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment