| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //-------------------------------------------------------------------------------------------------------
- // Copyright (C) Microsoft. All rights reserved.
- // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
- //-------------------------------------------------------------------------------------------------------
- var x = foo(1, 2, 3);
- var y = fooDeleted(1, 2, 3);
- function foo(a, b, c)
- {
- var res = {};
- var args = arguments;
-
- res.length = function() { return args.length; };
- res.named = function() { return b; };
- res.position = function() { return args[1]; };
-
- return res;
- }
- function fooDeleted(a, b, c)
- {
- delete arguments[1];
- var res = {};
- var args = arguments;
-
- res.length = function() { return args.length; };
- res.named = function() { return b; };
- res.position = function() { return args[1]; };
-
- return res;
- }
- WScript.SetTimeout(testFunction, 20);
- function testFunction()
- {
- telemetryLog(`xlength: ${x.length()}`, true); //3
- telemetryLog(`xnamed: ${x.named()}`, true); //2
- telemetryLog(`xposition: ${x.position()}`, true); //2
-
- telemetryLog(`ylength: ${y.length()}`, true); //3
- telemetryLog(`ynamed: ${y.named()}`, true); //2
- telemetryLog(`yposition: ${y.position()}`, true); //undefined
- emitTTDLog(ttdLogURI);
- }
|