-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[0.8] Properties observers registered too early #1258
Comments
I am seeing the same thing, but not in a native browser like Chrome. So it appears the lifecycle path differs between Shadow DOM and Shady DOM. This simple test demonstrates the order of operation, run under a particular browser type: lifecycle-tester.html:
index.html:
Under Chrome:
Under Firefox:
|
@robbear What you're talking about (lifecycle callbacks) is unrelated to whether property observers fire when the default value is set. Some ordering is different on native webcomponents vs. polyfilled webcomponents. However, we make some ordering guarantees that you can rely on (created => ready => attached are always fired in that order). |
The design notion here is that the element starts in a pristine state and you are informed of all changes that point on, including default values. Input values are also, by design, set before the We've also now normalized |
Properties observers seem to be set up too early.
If I declare a default value for a property, the property change callback is invoked before the component is ready.
This leads to the following output in the console :
Do we really want to observe the transition from undefined to default value ?
PS: I updated the code to reflect today's changes in ca0953c but it behaved the same prior to @kevinpschaaf commits.
The text was updated successfully, but these errors were encountered: