[scoped-custom-element-registry] Toggle attribute should only trigger attributechangedcallback on change#557
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. |
justinfagnani
left a comment
There was a problem hiding this comment.
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
attributeChangedCallbackin combination withsetAttribute,removeAttributeandtoggleAttribute, so I've added additional tests for this as well.