* 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.
<rdar://problem/19020769>
Created attachment 241811 [details] [PATCH] Proposed Fix
Comment on attachment 241811 [details] [PATCH] Proposed Fix Nice!
Comment on attachment 241811 [details] [PATCH] Proposed Fix Clearing flags on attachment: 241811 Committed r176324: <http://trac.webkit.org/changeset/176324>
All reviewed patches have been landed. Closing bug.