callbackSequence.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. telemetryLog("Start Global Code", true);
  6. function foo1()
  7. {
  8. telemetryLog("Start Foo1", true);
  9. WScript.Echo("Hello World - CallBack 1");
  10. WScript.SetTimeout(foo2, 200);
  11. telemetryLog("End Foo1", true);
  12. }
  13. function foo2()
  14. {
  15. telemetryLog("Start Foo2", true);
  16. WScript.Echo("Hello World - CallBack 2");
  17. WScript.SetTimeout(foo3, 200);
  18. telemetryLog("End Foo2", true);
  19. }
  20. function foo3()
  21. {
  22. telemetryLog("Start Foo3", true);
  23. WScript.Echo("Hello World - CallBack 3");
  24. telemetryLog("End Foo3", true);
  25. emitTTDLog(ttdLogURI);
  26. }
  27. WScript.SetTimeout(foo1, 200);
  28. WScript.Echo("Hello World - Global");
  29. telemetryLog("End Global Code", true);