A new proposal has been posted on
https://github.com/devtools-html/rfcs
subject: Standardize DevTools Panel initialization
link:
https://github.com/devtools-html/rfcs/issues/48
> The goal of this RFC is to standardize and simplify the initialization
code for
> our panels. Should make it easier for peers to jump from one panel to the
other.
> Also would love to address
> [Bug 1455421](
https://bugzilla.mozilla.org/show_bug.cgi?id=1455421) as a
side
> effect.
>
> This is the occasion to standardize and simplify the initialization of
our
> panels. The panel and initializer files seem very similar, both according
to
> their responsibilities and lifecycle, so maybe we can get rid of one, and
stop
> loading anything via a `<script>` tag.
>
> The proposal is to:
> - merge "panel" and "initializer" to a single file
> - decide on a consistent name for this file: "panel.js",
"{toolname}-panel.js",
> "{toolname}.js"?
> - load this file using the BrowserLoader from definitions.js
> - decide on a consistent name for the index: "index.html",
> "{toolname}-index.html", "{toolname}.html" (or xul, or xhtml [1])
>
> Interested to know if there is some added value that I missed with having
> separate files here. Are there concerns or limitations linked to using
the
> BrowserLoader for everything UI related here?
>
> [1] I believe some files use xhtml for no reason because they don't load
any
> localization DTD. Inspector, memory and perf-new can probably use html
now?