crossSiteMain.js 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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. //var e = WScript.LoadScriptFile("C:\\Chakra\\ChakraCore\\test\\TTBasic\\crossSiteChild.js", "samethread");
  6. var e = WScript.LoadScriptFile("crossSiteChild.js", "samethread");
  7. var child_obj = e.obj;
  8. child_obj.x = function foo1() {
  9. return "pass";
  10. }
  11. child_obj.y = function foo2(data) {
  12. telemetryLog(`${data}`, true);
  13. }
  14. WScript.SetTimeout(testFunction, 50);
  15. /////////////////
  16. function testFunction()
  17. {
  18. telemetryLog(`${child_obj.xval}`, true);
  19. telemetryLog(`${child_obj.otherObj.say} ${child_obj.otherStr}`, true);
  20. child_obj.xval = "passv"
  21. telemetryLog(`${child_obj.xval}`, true);
  22. emitTTDLog(ttdLogURI);
  23. }