On Fri, Oct 19, 2018 at 7:43 AM Stefan Arentz <sare...@mozilla.com> wrote:
> > > >> >> 1. >> 2. WebChannels >> >> <https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/WebChannel.jsm> >> in GeckoView-consuming browser-like Apps. WebChannels are a >> Firefox-specific chome-only feature that allows the browser chrome to >> communicate via message-passing with trusted Web Content; they are used to >> integrate Firefox with accounts.firefox.com and addons.mozilla.org. >> We need something that provides this functionality in the Reference >> Browser >> to support a first-class Firefox Accounts experience. Privileged Web >> Extensions are ideologically pure but don't have a concrete date on the >> GeckoView roadmap. Suggestions gratefully accepted! >> >> > Can we learn anything from how this was implemented on iOS? If I remember > correctly, we inject a helper user script into the webview, which then sets > up the right glue to do messages between the native application and the FxA > page loaded in the webview. > > One note, and please correct me if I am wrong: but the web based FxA login > flow can not depend on GeckoView - it has to work in both the system > webview and geckoview. It is not practical for non-browser applications to > pull in a giant dependency on GeckoView if all they need is a place to show > a web based login flow. Whatever we do here needs to work in both the > system webview and geckoview. > Yes, we can learn from iOS, and I believe your memory is correct. The WebView way to wire up messages from Web Content is https://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String) IIRC. If WebExtensions are not our radar now, maybe we could see if a > userscripts-like API is easier to implement? > It's my belief that the GV team is explicitly trying to avoid adding such an API. I'll let snorp and others say more, but the desire is to have _one_ API for talking to Web Content rather than building a content-interfacing API/platform parallel to Web Extensions. I do not have much context here, though, so -- snorp? Others? Links to tickets tracking the viewpoints would be helpful. Nick
_______________________________________________ Dev-fxacct mailing list Dev-fxacct@mozilla.org https://mail.mozilla.org/listinfo/dev-fxacct