-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinal-debug.js
More file actions
55 lines (46 loc) · 1.67 KB
/
final-debug.js
File metadata and controls
55 lines (46 loc) · 1.67 KB
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
console.log('🔬 Final debug test...');
// Test 1: Direct function call
window.testFunction = function() {
console.log('Direct function works!');
return 'success';
};
console.log('Test 1 - Direct function:');
console.log('typeof testFunction:', typeof testFunction);
console.log('Calling testFunction():', testFunction());
// Test 2: Object method
window.testObject = {
method: function() {
console.log('Object method works!');
return 'success';
}
};
console.log('Test 2 - Object method:');
console.log('typeof testObject.method:', typeof testObject.method);
console.log('Calling testObject.method():', testObject.method());
// Test 3: Check if assessorGrid is in a different scope
console.log('Test 3 - Scope check:');
console.log('window.assessorGrid === assessorGrid:', window.assessorGrid === assessorGrid);
console.log('window.assessorGrid.setConfig === assessorGrid.setConfig:', window.assessorGrid.setConfig === assessorGrid.setConfig);
// Test 4: Try different ways to call the method
console.log('Test 4 - Different call methods:');
try {
console.log('Method 1 - Direct call:', assessorGrid.setConfig({test: 1}));
} catch (e) {
console.log('Method 1 failed:', e.message);
}
try {
console.log('Method 2 - Window call:', window.assessorGrid.setConfig({test: 2}));
} catch (e) {
console.log('Method 2 failed:', e.message);
}
try {
const method = assessorGrid.setConfig;
console.log('Method 3 - Extracted method:', method({test: 3}));
} catch (e) {
console.log('Method 3 failed:', e.message);
}
try {
console.log('Method 4 - Apply call:', assessorGrid.setConfig.apply(assessorGrid, [{test: 4}]));
} catch (e) {
console.log('Method 4 failed:', e.message);
}