On 10/7/19 1:56 PM, #!/JoePea wrote:
Who's going to write code like that anyways?
In the general form of "function from a navigated-away-from document runs because it's called by some script from outside the document", I've seen this come up a number of times in web browser bug reports.
Everyone's moving to ES modules, where `this` for accessing the global is just `undefined`.
It's not just "this". The same thing applies to "window", "self", etc, etc. There is no way to actually get your hands on the global object explicitly in a DOM Window scope: you always get the WindowProxy instead.
It's highly unlikely that any concept other than "global object" will ever be conceived by the vast majority of users, especially future users.
Well, the thing that globalThis returns is NOT the global object, and telling people that it is will just confuse them when it behaves in a way they don't expect.
-Boris _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

