-
Notifications
You must be signed in to change notification settings - Fork 169
[scoped-custom-element-registry] Toggle attribute should only trigger attributechangedcallback on change #557
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
base: master
Are you sure you want to change the base?
Conversation
Looks good, but there's a formatting error on the changelog. I'm going to see if I can push to your branch to fix. *wow, that's a long branch name! my terminal's having trouble with it. |
ah, I don't have permissions to push. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the issue, fix, and tests!
You just need to rebase or merge master and fix the formatting on the changelog (npm run format
from the repo root should do it)
63d244f
to
3bbada4
Compare
Thanks for the quick response and the pointers to fix it @justinfagnani! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Fixes #556.
I fixed this by only triggering the attributeChangedCallback if the attribute's value was actually different. I've also added a test to assert the behavior.
There were no tests to assert the behavior of
attributeChangedCallback
in combination withsetAttribute
,removeAttribute
andtoggleAttribute
, so I've added additional tests for this as well.