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

[question] has="" and storing data #3

Open
drBenway opened this issue Mar 25, 2022 · 1 comment
Open

[question] has="" and storing data #3

drBenway opened this issue Mar 25, 2022 · 1 comment

Comments

@drBenway
Copy link

drBenway commented Mar 25, 2022

I like the has="" attribute but I'm wondering if it doesn't make sense to go for "data-has". In the example with the player's position this makes even more sense to me. That way you can drop the dependency on custom attributes.

@trusktr
Copy link
Member

trusktr commented Jul 25, 2022

@drBenway Thanks for the ideas, and sorry for the late reply!

I'm not clear on how using data-has would imply we can drop custom attributes. Either way, regardless of the chosen name, we'd need a way to know when to react to changes, and MutationObserver (whether here manually, or indirectly via custom-attributes) is the mechanism that notifies us.

Do you have a question on storing data somewhere? If so, what did you want to store?

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