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

drop "update" call when a data attribute changes #11

Open
kapouer opened this issue Nov 29, 2018 · 1 comment
Open

drop "update" call when a data attribute changes #11

kapouer opened this issue Nov 29, 2018 · 1 comment

Comments

@kapouer
Copy link
Member

kapouer commented Nov 29, 2018

This is completely useless: if there is an update fonction on the element, it's a custom element, and custom elements watch their attributes themselves.

@kapouer
Copy link
Member Author

kapouer commented Jan 24, 2019

That's done, but there still is a data-* binding, which is somewhat odd:
when a root node view data-xxx attribute changes, and if block.data.xxx exists, the attribute value replaces the block.data.xxx value.
It's cool but feels weird.
See

} else if (record.target == this.dom && record.type == "attributes" && record.attributeName && record.attributeName.startsWith('data-')) {

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

1 participant