Or even better could use chromeProxy to replace all of "(js.context as dynamic).chrome"