Frage

I noticed a change in Firefox 25 beta, soon to be released: Go to chrome://browser/content/devtools/webconsole.xul, view source, and in the current Firefox (24) you see:

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        id="devtools-webconsole"
        macanimationtype="document"
        fullscreenbutton="true"
        title="&window.title;"
        browserConsoleTitle="&browserConsole.title;"
        windowtype="devtools:webconsole"
        width="900" height="350"
        persist="screenX screenY width height sizemode">
  <script type="text/javascript" src="chrome://global/content/globalOverlay.js"/>
  <script type="text/javascript" src="webconsole.js"/>

  <commandset id="editMenuCommands"/>
...

In Firefox 25, however, the reference to webconsole.js is replaced with an inline script, function goUpdateConsoleCommands() with two goUpdateCommand calls.

Devtools-tweaks is not working for the network popup now, because the webconsole.js link no longer exists on that window. The code here has nothing to modify to change the popup: https://github.com/programmin1/DevTools-Tweaks/blob/master/content/netWinOverlay.js

Is there any easy way to re-hook this functionality into the network popup? Will JSON/xml parsing be introduced in Firefox soon, making this unnecessary?

War es hilfreich?

Lösung

The WebConsoleFrame stuff was ported to the add-on SDK loader in bug 877262.

Judging from the code, the following should give access to the WebConsoleFrame the add-on "uses":

var {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
var {WebConsoleFrame} = devtools.require("devtools/webconsole/webconsole");

As for the second part of your question: Will the devtools support the same stuff natively?

I'm not sure. You should get in touch with the devtools team and ask them and have a look at the existing bugs: Open devtools bugs containing "json". And/or file a new enhancement bug.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top