Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add global JS-Properties like "window.x" ? #3

Open
nuxodin opened this issue Mar 7, 2021 · 3 comments
Open

Add global JS-Properties like "window.x" ? #3

nuxodin opened this issue Mar 7, 2021 · 3 comments

Comments

@nuxodin
Copy link
Owner

nuxodin commented Mar 7, 2021

Would it be useful to be able to register for global properties?

@nuxodin
Copy link
Owner Author

nuxodin commented Mar 7, 2021

As we have js-modules, global js-properties are no longer recommended anyway?

@herberthobregon
Copy link
Contributor

It could be a good idea!
But it could be that it is oriented to create a "namespace"
Something like window.conectate.x to avoid possible collisions

@nuxodin
Copy link
Owner Author

nuxodin commented Mar 17, 2021

Yes, that's what I mean by global-js namespace, an object that is preferably the only global variable in a framework.

But I don't know if that's needed, you usually don't need global variable at all anymore with JS modules.

Or do you have such a usecase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants