does it make sense to add here a switch statement, I'd only integrate an if(this.options.onClose) this.reloadBrowser();
It would also be nice to add a comment why this line is necessary