We're going to rely on EventDispatcher for receiving these types of messages.
Assignee: nobody → esawin
Attachment #8818952 - Flags: review?(snorp)
3 years ago
Attachment #8818952 - Flags: review?(snorp) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/6745f30a350b [1.0] Remove GeckoView.ChromeDelegate.onScriptMessage. r=snorp
Reintroduce onScriptMessage() Currently GeckoView has no way of catching events, or properly passing data from PWAs, since there is no JS-interface, and loading "XPCOMUtils" modules in your web-page / PWA, to use Messaging.jsm ( EventDispatcher ), is not reasonable. ex: a PWA creates a file for saving, an android-app with GeckoView (running the PWA) has to get the generated blob, but the only way at the moment (which comes with limitations and huge inefficiency), is to create a Data URL (base64 encoding the blob), a.download, catch it on the other side with onExternalResponse, base64 decode, ... etc. Unless I'm missing something? If currently there's a way, an example code on how it is achieved will be really useful. Dispatching custom events from the PWA are not caught by GeckoView, but I guess without XPCOMUtils it is to be expected?
You need to log in before you can comment on or make changes to this bug.