RESOLVED FIXED 138845
Web Inspector: Improve basic JavaScript completion in inline <script>s
https://bugs.webkit.org/show_bug.cgi?id=138845
Summary Web Inspector: Improve basic JavaScript completion in inline <script>s
Joseph Pecoraro
Reported 2014-11-18 14:15:07 PST
* SUMMARY Basic JavaScript completion does not work in editable inline <script>s. There is an uncaught exception: CONSOLE ERROR TypeError: undefined is not an object (evaluating 'mainToken.state.lexical.type') It looks like we should be using mainToken.state.localState when inside a JavaScript mode inside of an HTML mode. * TEST 1. <script> 2. (function() { 3. var object = {}; 4. 6. })() 7. </script> * STEPS TO REPRODUCE 1. Inspect the test page 2. Start editing on line 4 3. Type "un" => expected "undefined" to come up as a completion suggestion 4. Type "obj" => expected local variable "object" to come up as a completion suggestion 5. Type "i" => expected built-in suggestions like "if", "in", and "instanceof" * NOTES - Should not regress editing inside JavaScript resources.
Attachments
[PATCH] Proposed Fix (3.46 KB, patch)
2014-11-18 14:17 PST, Joseph Pecoraro
no flags
Radar WebKit Bug Importer
Comment 1 2014-11-18 14:15:39 PST
Joseph Pecoraro
Comment 2 2014-11-18 14:17:02 PST
Created attachment 241811 [details] [PATCH] Proposed Fix
Timothy Hatcher
Comment 3 2014-11-19 09:51:42 PST
Comment on attachment 241811 [details] [PATCH] Proposed Fix Nice!
WebKit Commit Bot
Comment 4 2014-11-19 10:32:21 PST
Comment on attachment 241811 [details] [PATCH] Proposed Fix Clearing flags on attachment: 241811 Committed r176324: <http://trac.webkit.org/changeset/176324>
WebKit Commit Bot
Comment 5 2014-11-19 10:32:24 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.