then-chrome
then-chrome copied to clipboard
Proxy event channels to thenChrome also (for consistency)
Currently event channels are not in then-chrome. So I can not write:
thenChrome.alarms.create('alarm');
thenChrome.alarms.onAlarm.addListener(listener);
It gets error:
Uncaught TypeError: Cannot read property 'addListener' of undefined
I need to write:
thenChrome.alarms.create('alarm');
chrome.alarms.onAlarm.addListener(listener);
that looks less consistent.
It would be nice if event channels (like alarms.onAlarm
and etc) will be proxied to thenChrome
object.