Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

globalThis, self, frames #681

Closed
wants to merge 8 commits into from
Closed

globalThis, self, frames #681

wants to merge 8 commits into from

Conversation

icecream17
Copy link
Contributor

Description of the Change

Adds:

globalThis in 'support.variable'
self and frames in 'support.variable.dom'

self === window, and frames === window

Also, globalThis was added to js. It's a way to reference the value of (this) in any global scope.

MDN links:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
https://developer.mozilla.org/en-US/docs/Web/API/Window/window
https://developer.mozilla.org/en-US/docs/Web/API/Window/self
https://developer.mozilla.org/en-US/docs/Web/API/Window/frames

Currently only updates tree-sitter-javascript.cson, and not javascript.cson

Benefits

This is only a minor update

Possible Drawbacks

globalThis doesn't always point to a DOM object, so it's only in support.variable

In a worker context, self resolves to WorkerGlobalScope.self instead of window.self, so maybe also put that in support.variable

Renames "meta.delimiter.*.period.js" to "meta.delimiter.*.js"
(Renames meta.delimiter.property.period.js And meta.delimiter.method.period.js)
Match transforms many "\\." to "(\\.|\\?\\.)" (parenthesis sometimes used since it's unnecessary)
In keyword.operator.logical.js, because it's similar to the || operator.
@icecream17
Copy link
Contributor Author

icecream17 commented Nov 10, 2020

Today I did 4 6 more commits, but they're not supposed to be part of the merge request
Edit: I'm currently making a new branch so that the other commits won't show

Renames "meta.delimiter.*.period.js" to "meta.delimiter.*.js"
Only 1 change. I can't believe it. Sigh. See #1: atom@a527d0d

appveyor is amazing!!! =O
@icecream17
Copy link
Contributor Author

I'm making a new pull request with a branch - see previous comment

@icecream17 icecream17 closed this Nov 13, 2020
@icecream17 icecream17 mentioned this pull request Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant