Q: How to access parent scope in a function in a JS module I want to access the module's close() method from inside the event listener callback, and I don't know how to do it.
Given the following two methods inside a JS module:
close() {
    this.isOpen = false;

    // Stop detecting escape key press
    window.removeEventListener('keyup', this.escapeKeyPressListener);
},

/**
 * Responsible for adding listener function for escape keypress
 * @param {object} event - keyup event listener
 */
escapeKeyPressListener(event) {
    if (event.key === 'Escape' || event.key === 'Esc') {
        event.preventDefault();
        this.close();
    }
}

How can I access the close() method from within the listener callback?
