DevTools/Hacking: Difference between revisions

Jump to navigation Jump to search
Add even more clarity
(Rewrite for clarity)
(Add even more clarity)
Line 185: Line 185:
== Chrome Content ==
== Chrome Content ==


Much of the DevTools front-end / UI is currently loaded using <tt>chrome://</tt> URLs which allow those files to have privileged access to platform internals.
Much of the DevTools front-end / UI is currently loaded using <tt>chrome://</tt> URLs, which allow those files to have privileged access to platform internals.


"Chrome" here means "browser chrome", as in the UI, and bears no relation to "Chrome" as in the browser. We'd like to move away from this on DevTools and be more like regular web sites, but most tools are using <tt>chrome://</tt> URLs for now.
This is typically used to load XUL, HTML, and JS files in the UI.


Chrome content is typically used to load XUL, HTML, and JS files in the UI.
Note: "Chrome" here means "browser chrome", as in the UI, and bears no relation to "Chrome" as in the browser. We'd like to move away from this on DevTools and be more like regular web sites, but most tools are using <tt>chrome://</tt> URLs for now.


=== Packaging ===
=== Packaging ===


If you add a new file that should be loaded via <tt>chrome://</tt> (such as a new script file for a tool UI), you need to update a manifest file at <tt>/devtools/client/jar.mn</tt> so that it's packaged correctly.
If you add a new file that should be loaded via a <tt>chrome://</tt> URL, you need to update a manifest file at <tt>/devtools/client/jar.mn</tt> so that it's packaged correctly.


Please ensure that any new files are added so their entire source tree path is part of the URL. To do so, the <tt>jar.mn</tt> entry should look like:
Please ensure that any new files are added so their entire source tree path is part of the URL. To do so, the <tt>jar.mn</tt> entry should look like:
Confirmed users
100

edits

Navigation menu