class Test{ constructor() { this.req = new XMLHttpRequest(); this.req.addEventListener("onreadystatechange", this, false); this.param = 5; } handleEvent(e) { console.log(this); // { req: XMLHttpRequest, param: 5 } console.log(this.param) // 5 } }