Last active
August 29, 2015 14:20
-
-
Save normanzb/660ccaa5642d2ac05964 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
// here goes what englishtown does: | |
window._satellite_ready = window._satellite_ready || []; | |
window._satellite_ready.push(function(satellite){ | |
// ... setup state object and everything else ... | |
satellite.track(); | |
}); |
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
// here goes what joe does: | |
window._satellite_ready = window._satellite_ready || []; | |
// ... setup and make everything ready ... | |
for(var l = window._satellite_ready.length; l--;) { | |
window._satellite_ready[l].call(window._satellite); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to Joe:
I am not very sure if this is necessary, because i dont' know who's gonna load the satellite related scripts, and how it is loaded.
If it is us to load the related script then i think it pretty obvious when the satellite object became available and hence above code is completely unnecessary.
Let me know what do you think