Skip to content

Proposal: global.window = global #1043

@isaacs

Description

@isaacs

One of the biggest and weirdest stumbling blocks I'm seeing as people try to use npm and CommonJS for browser code is the difference in spelling of global vs window.

I'd like to propose that we just go ahead and create a global called window that is a reference to node's global object.

Yes, yes, "window" is a silly name. It was silly in the browser, and it's even sillier outside of it. But it's a fixture in the language, extremely low-risk, and will reduce a lot of friction onboarding browser JavaScript people.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussIssues opened for discussions and feedbacks.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions