Skip to content

(window instanceof Object) is false #2196

@warren-bank

Description

@warren-bank

A lot of libraries will use this to detect whether the code is running in a browser vs. node vs. etc..

If such a library is loaded by @require, then it won't be added to the (sandboxed) global namespace.

I get that an ES6 Proxy is used to sandbox, which is a great usage for it.. but (imho) it's target should identify as an Object.

note: (typeof window === "object") is true

workaround: @grant none

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions