JS: Add test with class stored in global variable

This commit is contained in:
Asger Feldthaus
2020-06-10 15:00:54 +01:00
parent c580ada527
commit bb2b7fb6fb
3 changed files with 26 additions and 0 deletions

View File

@@ -4,3 +4,9 @@ test_locationRef
| customization.js:3:3:3:14 | doc.location |
test_domValueRef
| customization.js:4:3:4:28 | doc.get ... 'test') |
| tst.js:45:8:45:7 | this |
| tst.js:46:7:46:12 | this.x |
| tst.js:49:3:49:8 | window |
| tst.js:50:3:50:8 | window |
| tst.js:50:3:50:14 | window.myApp |
| tst.js:50:3:50:18 | window.myApp.foo |

View File

@@ -0,0 +1,10 @@
/** @externs */
/**
* @constructor
* @name EventTarget
*/
function EventTarget() {}
/** @type {EventTarget} */
var window;

View File

@@ -39,3 +39,13 @@
factory2();
})();
(function pollute() {
class C {
foo() {
this.x; // Should not be a domValueRef
}
}
window.myApp = new C();
window.myApp.foo();
})();