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

Initialize attrs on attributechangedcallback #191

Merged
merged 3 commits into from
Mar 28, 2022

Conversation

keithamus
Copy link
Member

If attrs are used, and attributeChangedCallback fires before connectedCallback, attrs will be in their initially set state, rather than reflected from the attribute value, likewise attributes will be null rather than their attr value.

Initializing attrs on the first attributeChangedCallback call fixes this.

keithamus and others added 2 commits March 28, 2022 12:43
If attrs are used, and attributeChangedCallback fires before
connectedCallback, attrs will be in their initially set state, rather
than reflected from the attribute value, likewise attributes will be
null rather than their attr value.

Initializing attrs on the first attributeChangedCallback call fixes
this.

Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
@keithamus keithamus requested a review from a team as a code owner March 28, 2022 11:44
@keithamus keithamus requested a review from theinterned March 28, 2022 11:44
@koddsson koddsson merged commit d16d885 into main Mar 28, 2022
@koddsson koddsson deleted the initialize-attrs-on-attributechangedcallback branch March 28, 2022 11:58
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

Successfully merging this pull request may close these issues.

2 participants