Include `globalThis` in default JavaScript completions
Created attachment 358336 [details] [PATCH] Proposed Fix
Comment on attachment 358336 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=358336&action=review r=me Is `globalThis` something we'd also want to always show in the Scope chain when paused? > Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:661 > "return", "static", "super", "switch", "this", "throw", "true", "try", Should we be including `"globalThis"` in `allKeywords` as well? Ditto (727) (I can't comment on it because it's outside of this diff's range) > Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:664 > + var valueKeywords = ["false", "Infinity", "NaN", "null", "this", "true", "undefined", "globalThis"]; `"globalThis"` should be placed before `"Infinity"` if we want to keep it alphabetized. NIT: considering how small this patch is, I wouldn't be against a bit of refactoring (e.g. `.keySet()` to `new Set()`)
Comment on attachment 358336 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=358336&action=review >> Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:661 >> "return", "static", "super", "switch", "this", "throw", "true", "try", > > Should we be including `"globalThis"` in `allKeywords` as well? > > Ditto (727) (I can't comment on it because it's outside of this diff's range) `globalThis` is not a keyword. >> Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:664 >> + var valueKeywords = ["false", "Infinity", "NaN", "null", "this", "true", "undefined", "globalThis"]; > > `"globalThis"` should be placed before `"Infinity"` if we want to keep it alphabetized. > > NIT: considering how small this patch is, I wouldn't be against a bit of refactoring (e.g. `.keySet()` to `new Set()`) Good idea but I'll keep the code as is for now to avoid breaking something inadvertently.
Comment on attachment 358336 [details] [PATCH] Proposed Fix Clearing flags on attachment: 358336 Committed r239630: <https://trac.webkit.org/changeset/239630>
All reviewed patches have been landed. Closing bug.
<rdar://problem/47054614>