Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

fix(core): property initialization #6593

Merged

Conversation

coryrylan
Copy link
Contributor

@coryrylan coryrylan commented Jan 25, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • If applicable, have a visual design approval

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • clarity.design website / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Some custom elements fail to instantiate due to a property being set to early in its life cycle. If a native built in property is set that reflects its attribute before the element has been added to the DOM it can throw an exception in some browsers.

See references

What is the new behavior?

This moves the property to be set in the connectedCallback to prevent the exception. Unfortunately I could not find a great way to test this since this is a life cycle issue controlled by the browser. This will need to be backported to v5

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Fixes invalid native property initialization causing exception with
certain custom elements.
- closes vmware-archive#6589
- closes vmware-archive#6590

Signed-off-by: Cory Rylan <splintercode.cb@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants