Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
65 lines (48 loc) · 1.87 KB

File metadata and controls

65 lines (48 loc) · 1.87 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function PropertyExists(obj, propName)
{
return obj.hasOwnProperty(propName);
}
var val = 100;
function IncrVal()
{
telemetryLog(`IncrVal:: ${this.val} args.length : ${arguments.length}`, true);
this.val++;
return this.val + " " + arguments.length;
}
var fGlobalThis1 = IncrVal.bind();
var fGlobalThis2 = IncrVal.bind(this);
var fGlobalThis3 = IncrVal.bind(this, 50);
var fGlobalThisNull = IncrVal.bind(null);
var objWithVal1 = { val : 200 }
var fLocal1 = IncrVal.bind(objWithVal1);
var x = 20;
var y = 30;
function add()
{
return this.x + this.y;
}
var o = { x: 5, y: 6};
var f = add.bind(o);
var f2 = new f();
WScript.SetTimeout(testFunction, 50);
/////////////////
function testFunction()
{
telemetryLog(`global object 1 ${fGlobalThis1()}`, true);
telemetryLog(`global object 1 ${fGlobalThis1(10,20)}`, true);
telemetryLog(`global object 2 ${fGlobalThis2()}`, true);
telemetryLog(`global object 2 ${fGlobalThis2(10,20)}`, true);
telemetryLog(`global object 3 ${fGlobalThis3()}`, true);
telemetryLog(`global object 3 ${fGlobalThis3(10,20)}`, true);
telemetryLog(`global object null ${fGlobalThisNull(10,20)}`, true);
telemetryLog(`local length ${fLocal1.length}`, true);
telemetryLog(`Local object2 ${fLocal1(10)}`, true);
telemetryLog(`Add Test ${add()}`, true);
telemetryLog(`f Test ${f()}`, true);
telemetryLog(`Proto Test ${add.prototype.isPrototypeOf(f2)}`, true);
emitTTDLog(ttdLogURI);
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.