Bug 19119 - Some objects in the global scope are not completed
Summary: Some objects in the global scope are not completed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kent Hansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-18 20:27 PDT by Anthony Ricaud
Modified: 2010-01-13 10:14 PST (History)
6 users (show)

See Also:


Attachments
Proposed patch (2.95 KB, patch)
2010-01-13 07:59 PST, Kent Hansen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Ricaud 2008-05-18 20:27:44 PDT
String, Date and maybe other objects are not completed in the Console. Image is completed though.
Comment 1 Joseph Pecoraro 2009-07-27 09:49:57 PDT
This looks like a good place to start:
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects

The list of globals that don't appear in the console's autocompletion:
var globals = ["Array", "Boolean", "Date", "Error", "Function", "Math", "Number", "Object", "RegExp", "String"]

Note that the following "Error" globals did appear:
EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError
Comment 2 Keishi Hattori 2009-07-27 09:55:36 PDT
Basically all the {DontEnum} attributes don't come up as completion candidates.
Which is quite a lot ... 
You can grep for "DontEnum" to find a lot of them.

Examples:
String
Date
String.charAt
String.substring
Math.power
document.toString
...
Comment 3 Kent Hansen 2010-01-13 07:59:08 PST
Created attachment 46464 [details]
Proposed patch
Comment 4 Kent Hansen 2010-01-13 08:04:35 PST
There doesn't appear to be any tests for auto-completion. If anyone has ideas for going about writing one (that doesn't involve manual/simulated input events and works cross-platform :) ), I'm all ears.
Comment 5 WebKit Commit Bot 2010-01-13 10:14:23 PST
Comment on attachment 46464 [details]
Proposed patch

Clearing flags on attachment: 46464

Committed r53192: <http://trac.webkit.org/changeset/53192>
Comment 6 WebKit Commit Bot 2010-01-13 10:14:28 PST
All reviewed patches have been landed.  Closing bug.