firebug / firebug

Web Development Evolved - The Firebug you have known and loved
http://getfirebug.com/
1.35k stars 343 forks source link

Allow Firebug extensions to modify require.js config before modules are loaded #4644

Open fbugissues opened 9 years ago

fbugissues commented 9 years ago

Originally reported on Google Code with ID 4506

Crossfire wants to be able to modify Firebug's requirejs config before the modules begin
loading.

I created a function called onModulePreLoad which gets a config object and must return
a config object. It is attached to the Firebug object so extensions can call it before
modules are loaded.

I use it like:

    Firebug.onModulePreLoad(function crossfirePreLoad( config) {
        FBTrace.sysout("Crossfire onModulePreload: config => "+config, config);
        config.debug = true;

        config.paths.arch = "crossfireModules/tools/client";
        config.paths.crossfireModules = "crossfireModules";

        return config;
    });

But I needed a place to stick the patch.

Reported by collins.mike on 2011-06-06 23:30:48


fbugissues commented 9 years ago
We should discuss at todays call, some comments:

- We could also need an event saying that Firebug is fully loaded and an extension
can start loading its modules too (if any). Or Firebug could kickoff the extension-module-loading-process
for the extension directly.

- Firebug.onModulePreLoadListeners: what about have more generic name like: Firebug.extensions?
I could imagine further events in the future.

- I tend to think that the file should be rather "firebugConfig.js" than "moduleConfig.js"

- The 'Firebug' global & scopes (perhaps a bit out of scope of this report):

browser.xul scope: this is where moduleConfig.js is loaded, Firebug global created.
firebugFrame.xul scope: this is where main.js is loaded. Firebug correctly accessed
through top.Firebug.

Now module-loader loads firebug/firebug module (firebugFrame.xul scope) and overwrites
the existing Firebug variable by saying window.Firebug = ...
I thing this is wrong the existing global should be reused so browser.xul & firebugFrame.xul
still refers to the same global and we keep the registered listeners.

Honza

Reported by odvarko on 2011-06-07 11:36:23

fbugissues commented 9 years ago

Reported by pedrosimonetti on 2011-06-07 17:27:28

fbugissues commented 9 years ago
Set status to "Started". We don't use "Accepted" as status.

Reported by sebastianzartner@gmx.de on 2011-08-25 12:11:45

fbugissues commented 9 years ago

Reported by sebastianzartner@gmx.de on 2011-08-25 12:12:11

fbugissues commented 9 years ago

Reported by sebastianzartner on 2013-06-11 12:10:55

fbugissues commented 9 years ago
I assume Mike is not gonna work on this, so I reset the status.

Sebastian

Reported by sebastianzartner on 2013-11-06 09:16:38