Closed Bug 559748 Opened 14 years ago Closed 12 years ago

Create an API for injecting commands and code libraries into the Console input and JS Workspaces

Categories

(DevTools :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: ddahl, Unassigned)

References

Details

(Whiteboard: [console-3])

A simple API to inject user and fx-team devised commands and code libraries into the Console's input box and JS Workspaces.

The API will allow for persistence of these libs and commands much like the way ubiquity works.
Blocks: 529086
I imagine the first command would be "load" like:

> load jquery

the result would be jquery.latest being added as a script node in the current contentDocument

other commands would be:

> dir Object

which would print to the console all of the properties and values in an object.

"grep like" commands would be cool as well.
that's certainly one way to do it and meshes well with a js "term". Other useful term-functions might be "print", "printf", "log", "save" or "export" for dumping the contents of a term...

Some of these things might be better implemented through UI though.
I'm thinking about this from a low-level "Firefox SDK" angle - but, a UI for the front-end will be super cool.
Priority: -- → P2
Depends on: 575789
Whiteboard: [kd4b5]
Whiteboard: [kd4b5]
Assignee: ddahl → nobody
Priority: P2 → --
clearing priority on this as I don't believe this is in line for firefox4.
Target Milestone: --- → Future
Whiteboard: [console-3]
How about a way to load CommonJS modules, say, via JetPack's loader?
(In reply to comment #5)
> How about a way to load CommonJS modules, say, via JetPack's loader?

I'll have to play with that concept via my devtools sdk code: https://github.com/daviddahl/devtools
covered by GCLI.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.