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

Unprefixed IDs #1417

Open
gabalafou opened this issue Aug 18, 2023 · 2 comments
Open

Unprefixed IDs #1417

gabalafou opened this issue Aug 18, 2023 · 2 comments
Labels
tag: javascript Pull requests that update Javascript code

Comments

@gabalafou
Copy link
Collaborator

Without prefixes for names that live in a global namespace, it's so, so easy to end up with name clashes. What if someone uses this theme but one of their pages loads a third-party JavaScript widget that has its own version switcher button with the same versionswitcherbutton id?

Originally posted by @gabalafou in #1414 (comment)

@trallard trallard added the tag: javascript Pull requests that update Javascript code label Aug 22, 2023
@trallard
Copy link
Collaborator

I am +1 on moving to a pattern where we prefix our own ids with pst_ the same way we do for example with CSS variables

@12rambau
Copy link
Collaborator

I'm +1 as well, I don't know what is the convention for prefixes in the javascripts community, camel case or snake case ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

3 participants