Created
March 7, 2018 16:12
-
-
Save dkstevekwak/5ea48219fb8c72defe3acd74209e49f7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* Initialize CSInterface */ | |
| var csInterface = new CSInterface(); | |
| /* Nested callbacks (callback hell) */ | |
| csInterface.evalScript('firstFunction()', function(firstResult){ | |
| csInterface.evalScript(`secondFunction(${firstResult})`, function(secondResult){ | |
| csInterface.evalScript(`thirdFunction(${secondResult})`, function(thirdResult){ | |
| // more callbacks..! | |
| }) | |
| }) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment