Open
Bug 794328
Opened 13 years ago
Updated 9 months ago
Beef up shell help()
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: sfink, Assigned: sfink)
References
(Blocks 1 open bug)
Details
(Whiteboard: [js:p3])
Attachments
(1 file)
|
4.80 KB,
patch
|
Details | Diff | Splinter Review |
Given my extremely weak familiarity with Javascript, I'm getting extremely jealous of the python shell's ability to show useful help.
For example, I'd really like
help([])
to give me a list of the things that Arrays know how to do.
| Assignee | ||
Comment 1•13 years ago
|
||
This is one incomplete, general approach to it. It just dumps out all of properties of what you pass it. It'll display the .usage and .help on anything it finds (horribly formatted).
Vague later ideas include having the shell load in a ~/.jsrc or something, which could have a bunch of
Array.prototype.join.usage = "obj.join(str)";
Array.prototype.join.help = "smushes together array elements, see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/join"
or something. I'd also like it to support .help properties on other objects.
I know the JS shell is only meant for testing, but it's my primary way of interacting with Javascript.
Updated•13 years ago
|
Whiteboard: [js:p3]
Updated•3 years ago
|
Severity: normal → S3
Updated•9 months ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•