Skip to content
This repository was archived by the owner on Jan 28, 2023. It is now read-only.
This repository was archived by the owner on Jan 28, 2023. It is now read-only.

Migrating to WebExtensions (if it will be possible) due to Firefox 57 dropping support for XUL-based add-ons #1

@nohamelin

Description

@nohamelin

Since Firefox 57, this so-called legacy add-on it's not possible to install. Only WebExtensions add-ons are supported by Fx.


The required personal work to do a full rewriting of the add-on to the WebExtensions model is not much of a issue per se, as the code-base is fairly "small", but, currently, it's not possible, as the necessary WE APIs in Firefox doesn't exist yet:

  1. A basic API requirement is to know enough data about each search engine to recreate it fully from a openSearch XML document object built from the former data. This is not possible at all: the Google Chrome API, used as base for WE, expose nothing about the engines. Besides the access to most attributes of the nsISearchEngine interface, many internal attributes are required too, making this requeriment very hard to see accomplished upstream. Bug 1352598 exposed a few properties, still far of the necessary.
    Check below for an available workaround.

  2. The importing of a openSearch XML file requires at least an API to create dynamically search engines. Again, it doesn't exist. Bug 1268401 was about it, closed by favoring engine enterprise policies, something (apparently?) not helpful for this case.

  3. All the UI integration with the Search pane of the Firefox Preferences pane will be lost, as, upstream, it's being considered only for system add-ons. So, I will need to move all the UI to a new html-based pane attached to a toolbar button, or a full in-content page: the usual UI choices left to WE add-ons. I'm hardly enthusiastic about this task.

  4. About filePickers:
    a) To allow the user to select one or more files to be imported, it's possible use the usual html element <input type="file"/>, though I will wait to bug 1292701 being fixed before playing with it.
    b) To allow the user to select the new file to be created at exporting, it looks that it's posible to trigger the "Save To" browser dialog with a blob object. I need to investigate it.

  5. To start to evaluate the exporting of the whole set of engines to a zip file, at least the previous points 1. and 4b. must be positively resolved. Besides that, I guess that it is possible: I didn't have investigated it yet.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions