Skip to content

No-op mode doesn't work on Safari #364

Closed
@Helloyunho

Description

In Safari, no-op mode doesn't work as the line below returns true.

if (typeof globalThis.browser === "undefined" || Object.getPrototypeOf(globalThis.browser) !== Object.prototype) {

Strangely, the browser object on Safari inherits CallbackObject. So Object.getPrototypeOf(globalThis.browser) doesn't return Object.

Object.getPrototypeOf(Object.getPrototypeOf(globalThis.browser)) !== Object.prototype finally gives the expected value.

CleanShot 2022-03-02 at 23 14 30

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions