closes #2353
This commit is contained in:
parent
63d0f055fc
commit
ec4dcb279a
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ The `connectedCallback` triggers when the element is added to the document. Not
|
||||||
|
|
||||||
In the current implementation of `<time-formatted>`, after the element is rendered, further attribute changes don't have any effect. That's strange for an HTML element. Usually, when we change an attribute, like `a.href`, we expect the change to be immediately visible. So let's fix this.
|
In the current implementation of `<time-formatted>`, after the element is rendered, further attribute changes don't have any effect. That's strange for an HTML element. Usually, when we change an attribute, like `a.href`, we expect the change to be immediately visible. So let's fix this.
|
||||||
|
|
||||||
We can observe attributes by providing their list in `observedAttributes()` static getter. For such attributes, `attributeChangedCallback` is called when they are modified. It doesn't trigger for an attribute for performance reasons.
|
We can observe attributes by providing their list in `observedAttributes()` static getter. For such attributes, `attributeChangedCallback` is called when they are modified. It doesn't trigger for other, unlisted attributes (that's for performance reasons).
|
||||||
|
|
||||||
Here's a new `<time-formatted>`, that auto-updates when attributes change:
|
Here's a new `<time-formatted>`, that auto-updates when attributes change:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue