v3.0.0
Breaking:
- Life cycle ordering slightly changed: behaviors are constructed and their
connectedCallback
executed at the same time, back to back. awaitElementDefined
is now a static property, f.e.static awaitElementDefined = true
. The non-static property is no longer supported.
Fixes:
- This slight change in ordering was needed in order for the
awaitElementDefined
property to work well. Previously, a behavior would be instantiated even if an element was not yet defined, then itsconnectedCallback
fired later after element definition. Now, behaviors will not be instantiated at all, until their host element is defined, upgraded, and connected. Additionally, behaviors will no longer be instantiated and connected at all if their element is removed from DOM before being defined and upgraded.
Features:
Overall this stabilizes the way behaviors work, and it is only a breaking change mainly if you were previously using the awaitElementDefined
property, which was previously undocumented.
- The README has been updated to document the
awaitElementDefined
property.