Embedding Projects

Last month I blogged about Why Embedding Matters, and then I described a variety of Embedding Use Cases. Here are some projects that would address those cases. If you could choose, which would you do first?

Embedding Framework for Headless Browsing

An Embedding Framework for Headless Browsing would enable internal Gecko testing frameworks, scriptable browsers like SlimerJS, and other tools that automate web page interactions to do so without having to display them in a visible window (or jump through hoops to avoid doing so).

It would be available for all shipping versions of Gecko in Firefox (Nightly, Aurora/DevEdition, Beta, Release). It would support all three major desktop OSes (starting with Linux, which is popular for testing websites in continuous integration). It might provide a command-line flag for running Firefox headlessly (as Chrome is planning to do).

Desktop Browser Runtime

A Desktop Browser Runtime is a specialized application runtime that would address the Hybrid Desktop Web Browser use case. It could also be used to build Site-Specific Browsers.

It would provide core OS APIs (file I/O, networking, process management, etc.) along with desktop integration (windows, menus, application lifecycle, etc.). It would also include an API to load and manage untrusted web content in isolated frames.

It might integrate Node.js using SpiderNode, both to provide core APIs and to enable access to an ecosystem of third-party modules. And it might support WebExtensions by default and provide a service (like the User-Agent Service in Tofino) for storing, querying, and retrieving browsing data.

WebView for Android and iOS

A WebView for Android would provide a Gecko equivalent to Android’s WebView class. It would enable Android app developers to build Hybrid Mobile Apps for Android as well as Native Android Apps that incorporate web content. A WebView for iOS would do the same thing as the WebView for Android project, but for iOS, to provide the equivalent of its WKWebView class.

Embedding Framework for Desktop

An Embedding Framework for Desktop would support web content rendering in native desktop apps, including application frameworks like the Desktop Browser Runtime. It might provide a measure of compatibility with existing APIs for embedding rendering engines, like the Chromium Embedded Framework. Alternately, it might support embedding of both Gecko and Servo.


Also published on Medium.

 

Myk Melez

Myk is a Principal Software Architect and in-house entrepreneur at Mozilla. A Mozillian since 1999, he's contributed to the Web App Developer Initiative, PluotSorbet, Open Web Apps, Firefox OS Simulator, Jetpack, Raindrop, Snowl, Personas, Firefox, Thunderbird, and Bugzilla. He's just a cook. He's all out of bubblegum.

 

9 thoughts on “Embedding Projects

    1. Ah, K-Meleon, I haven’t heard about that project in a while! And I see from its website that the current release is over a year old. Is it still under active development, and how does it embed Gecko?

  1. I would choose Embedding Framework for Headless Browsing. As I’ve tried headless testing via SlimerJS + Xvfb in the past and have been fustrated with not being able to get it running on AWS consistently.

    1. Jeffrey, I’ve heard a variety of frustrations with SlimerJS + Xvfb (mostly around the extra work required to configure it, and the perf hit), although I haven’t heard that one in particular. Any details you can provide about issues with SlimerJS on AWS would be appreciated!

      1. Sorry it’s been over a year since I’ve tried to get it working. I just remember having trouble initialising and restarting it. So I couldn’t get the some test/example to run more than once.

  2. Mozilla already has the obvious app for this – Thunderbird. I know that the last time I commented on your work with respect to Thunderbird, you did not think that was a great application, but everything you are doing just screams “Thunderbird needs to move this way” all over it.

    1. Hmm, I don’t recall that conversation, but in any case, these are project ideas, not necessarily projects that are in progress (with the exception of a Gecko-based WebView for Android, which folks are working on over in bug 1322573). So there isn’t yet anything for Thunderbird to adopt.

      I do think that Thunderbird (and other Mozilla applications, including Firefox itself) might benefit from a runtime like the Desktop Browser Runtime, which enable them to implement a native app using web technologies and Node.js APIs.

      However, I also know that updating a large codebase like Thunderbird’s to use different implementation technologies is a difficult undertaking. I haven’t done the analysis to determine if it’s feasible (assuming that a suitable runtime were to be developed), so I can’t recommend it for Thunderbird

      That may sound like I’m against the idea, but it’s not the case. Rather, I’m cautious about making a recommendation when I don’t have enough information, and especially when the solution I might recommend isn’t currently available.

  3. What would be required to create a gecko-based version of webkitgtk+ (https://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html#webkitgtk-webkitwebview.description)?
    I’m not sure if you’re aware, but a number of years ago GNOME used gecko for their browser widget (gtk-mozembed, iirc) but moved to WebKit because it supported embedded use cases rather more explicitly (well, the fact Mozilla stopped even nominally supporting mozembed certainly didn’t help matters).
    The point being, to achieve more than an embeddable webview, but deep integration with the gecko runtime such that the DOM might be mapped to GObject (or any other base object a native tk uses) seems quite difficult.
    Any thoughts?

    1. I’m not that familiar with WebKitGTK+, so I can’t speak to the requirements at a low level. I guess my primary thought is that it isn’t clear what the benefits would be of “deep integration” with Gecko.

      Are there particular use cases you have in mind for which a shallow integration would be insufficient?

Leave a Reply

Your email address will not be published. Required fields are marked *