Skip to content

Why use globals? #781

@MattiSG

Description

@MattiSG

This library seems to be relying on a large amount of globals to function. This is surprising, as leaking state-holding variables in the global namespace is most often considered bad practice, for it leads to potential conflicts with other libraries and decreased maintainability.

However, this practice seems absolutely conscious and voluntary in this project, as these variables are prefixed with window. to expose them globally on the browser.

As this practice makes me extremely wary of including the library as it is, I would like to know what is the rationale for exposing so many globals (and requesting clients to do so too).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions