On Tue, Oct 6, 2015 at 10:33 PM, James Long <
jl...@mozilla.com> wrote:
> I've been wanting for us to have something like this for a long time! An
> official, clean way to extend tools. Great work.
>
Thanks James, I'm always happy when I'm able to turn my contribution time
into something actually useful.
> Personally I would find it useful if a couple of us wrote down
> requirements first before fleshing this out too much. There's a lot of
> semi-complex things we might want to expose, for example a way of
> "installing" a custom backend actor. I don't see a whole lot in your patch
> except a few simple APIs, unless I'm missing something?
>
This is a perfect timing to write down requirements and/or followups, my
goal is currently in the "chrome parity" direction, nevertheless the chrome
devtools api is pretty limited and most of the Firefox addons that I'm
working on with Jan under the FirebugWG github organization do not fall
exactly into the limited chrome devtools API "basket", so my real interest
is open up the WebExtension APIs to more things.
and yes: in the current patch I've just "sketched" the thing (in the
comment I've linked the json files which describe the full chrome devtools
API and I've listed what I didn't looked into yet, e.g. sidebars,
evaluating in a frame or the devtools.network etc.), just the amount needed
to be able to run a real world addon (because I wanted to be sure I was
implementing a reasonable amount of the original API but at the same time I
didn't want to annoy the reviewer by asking a preliminary feedback on a
huge patch)
> As we write more stuff in React, there's also a lot of potential for the
> ability to completely swap out random React components, like the
> pretty-printer or something like that.
>
> Whatever we do, the APIs should be easy to add more complex over time.
>
I absolutely agree, as an example some of the things that we do in most of
the addons in the "
github.com/firebug" organization are:
- registering a custom actor into the remote debugging server
- creating custom web-like contexts for the addons UI (where the React code
runs) and injection of custom API into it
and the latter is very similar to define new "ExtensionPage" types in the
WebExtension internals (e.g. in the patch I define two new ExtensionPage
types: devtools_page and devtools_panel) and registering new custom API.