mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
add support for subclasses of EventEmitter
This commit is contained in:
@@ -4,3 +4,5 @@
|
||||
| tst.js:20:17:20:21 | "foo" | tst.js:19:16:19:18 | foo |
|
||||
| tst.js:21:17:21:21 | "bar" | tst.js:19:39:19:41 | bar |
|
||||
| tst.js:28:17:28:22 | "blab" | tst.js:25:16:25:20 | event |
|
||||
| tst.js:34:18:34:22 | "BOH" | tst.js:33:17:33:17 | x |
|
||||
| tst.js:40:20:40:27 | "yabity" | tst.js:39:19:39:19 | x |
|
||||
|
||||
@@ -26,3 +26,15 @@ em3.on("bla", (event) => {
|
||||
event.returnValue = "foo"
|
||||
});
|
||||
em3.emit("bla", "blab");
|
||||
|
||||
class MyEventEmitter extends emitter {};
|
||||
|
||||
var em4 = new MyEventEmitter();
|
||||
em4.on("blab", (x) => {});
|
||||
em4.emit("blab", "BOH");
|
||||
|
||||
class ExtendsMyCustomEmitter extends MyEventEmitter{}
|
||||
|
||||
var em5 = new ExtendsMyCustomEmitter();
|
||||
em5.on("yibity", (x) => {});
|
||||
em5.emit("yibity", "yabity");
|
||||
Reference in New Issue
Block a user