Remove ext.onMessage
Background
ext.port
is an abstraction layered on top of ext.onMessage
, which is based on browser.runtime.onMessage
.
What to change
My idea was to use browser.runtime.onMessage
directly from Port
instead of going through ext.onMessage
.
I think we need to extract this code https://gitlab.com/eyeo/adblockplus/adblockpluschrome/blob/next/ext/background.js#L499 to a function that is callable from messaging.js.
Does this make sense? I have to admit I don't quite understand why the layering is so complex. There is also this Firefox devtools panel bug described in content.js