Skip to content

Rule: Prefer .instanceOf(T) instead of instanceof T for class instance checks #56

@Fevol

Description

@Fevol

When using pop-out windows, event and primitive prototypes will differ from the main window, causing instanceof checks to fail in rare cases. When checking for HTMLElement, MouseEvent, etc., it is always preferable to use the .instanceOf(T) variant, over the regular instanceof T.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions