How to connect a customElement to a Message Filter custom action?

Hi,

in recent versions of Thunderbird the XBL bindings have been removed; my extension used these to add a custom message filter action, so that part of it is no longer working.

The documentation says the bindings need to be replaces by a custom element, which is fine, but I can’t really find any information on how to link that custom element to the custom filter action.

The patch diffs for the removal of the relevant part https://bugzilla.mozilla.org/show_bug.cgi?id=1489172 show me how to create a customElement for this, but not how to get it picked up by my custom Filter Action…

Does anyone know if there is an example of this, and/or an extension that uses custom message filters with arguments in TB 68+, where I can take a peek?

I have the same wish - an example in TB68’s web API for adding an action that can be used in filtering would be very useful.

I think the way to go is to make a MailExtension (WebExtenion) that contains a WebExtension Experiment. From there, ChromeUtils.import(“resource:///modules/MailServices.jsm”) and MailServices.filters.addCustomAction where the argument is the custom action, that implements the nsIMsgFilterCustomAction interface.

An alternative route would be to mark the extension as legacy, but that will probably entail more work at the next TB release.

Legacy XUL addons will not be supported in the next release, according to current plans: https://groups.google.com/forum/m/#!topic/tb-planning/-E8Yw6POxEE

I was already using addCustomAction for older versions of TB, the problem was how to actually link that action to potential action targets (originally defined using XBL bindings). I recently found the FiltaQuilla extension was updated to TB68, and with that as a base and some trial and error I managed to get it working for my extension in TB68.

I just needed the actions to show up in mail filter targets, which does not require anything else but AddCustomAction.