WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
27696
Inspector: Console should show completions for the command line APIs
https://bugs.webkit.org/show_bug.cgi?id=27696
Summary
Inspector: Console should show completions for the command line APIs
Keishi Hattori
Reported
2009-07-26 22:56:30 PDT
Currently the completion candidates do not include command line APIs.
Attachments
Patch
(2.49 KB, patch)
2009-07-26 22:58 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
oops tabs
(2.35 KB, patch)
2009-07-27 02:06 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Fixed sortedProperties
(2.36 KB, patch)
2009-07-27 08:47 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Eliminated reduce
(2.39 KB, patch)
2009-07-28 21:41 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Eliminated reduce
(2.40 KB, patch)
2009-07-28 22:31 PDT
,
Keishi Hattori
timothy
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Keishi Hattori
Comment 1
2009-07-26 22:58:04 PDT
Created
attachment 33520
[details]
Patch
Keishi Hattori
Comment 2
2009-07-27 02:06:27 PDT
Created
attachment 33525
[details]
oops tabs
Joseph Pecoraro
Comment 3
2009-07-27 08:13:22 PDT
Sort function for Object.sortedProperties is used in ObjectPropertiesSections. You should that parameter (sortFunc) back. If sortFunc is not provided then the normal sort() is applied so it works out fine. Also what about global functions/classes? For example: String, Date, toString, Number, ...
Keishi Hattori
Comment 4
2009-07-27 08:47:02 PDT
Created
attachment 33549
[details]
Fixed sortedProperties (In reply to
comment #3
)
> Sort function for Object.sortedProperties is used in ObjectPropertiesSections. > You should that parameter (sortFunc) back. If sortFunc is not provided then > the normal sort() is applied so it works out fine.
Sorry my mistake.
> Also what about global functions/classes? For example: > String, Date, toString, Number, ...
Great idea. My understanding is that those are specified are {DontEnum} so you need to keep a list of them. I think I'll file separate bug.
Timothy Hatcher
Comment 5
2009-07-28 20:50:04 PDT
Comment on
attachment 33549
[details]
Fixed sortedProperties
> + commandLineAPI = commandLineAPI.reduce(function(a, prop) { > + if (prop.charAt(0) !== "_") > + a.push(prop); > + return a; > + }, []);
This is pretty fancy. I never really used/liked reduce or map. I think this would be easier to read as a simple for loop that only appends things to properties not starting with "_". I bet it will be less code too!
Keishi Hattori
Comment 6
2009-07-28 21:41:44 PDT
Created
attachment 33690
[details]
Eliminated reduce
Keishi Hattori
Comment 7
2009-07-28 22:31:10 PDT
Created
attachment 33693
[details]
Eliminated reduce
David Levin
Comment 8
2009-07-29 00:30:20 PDT
Assign to levin for landing.
David Levin
Comment 9
2009-07-29 01:09:33 PDT
Committed as
http://trac.webkit.org/changeset/46526
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug