} else { // Hatch status unknown; attempt to connect
service.messages[msg.msgid] = msg;
service.pending.push(msg);
- service.hatchConnect();
+ // Connect to Hatch asynchronously. Othwerise, results
+ // in a $rootScope:inprog error in Firefox, possibly
+ // because hatchConnect() does not yet work in FF.
+ //
+ // Firefox does not yet support runtime.connect(..)
+ // from the browser to "externally_connectable" extensions.
+ // http://stackoverflow.com/questions/38487552/externally-connectable-and-firefox-webextensions
+ // http://stackoverflow.com/questions/10526995/can-a-site-invoke-a-browser-extension/10527809#10527809
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1204583
+ $timeout(service.hatchConnect);
}
return msg.deferred.promise;