You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that IDL attribute handling in Arrow templates is broken in v1.0.0-alpha.9. I expected the following code to call the setter for complexProp on Test and that logging the value in connectedCallback would provide the correct value:
classTestextendsHTMLElement{
#prop;setcomplexProp(newValue){this.#prop =newValue;}connectedCallback(){console.log(this.#prop.bar);// does not log}}customElements.define("app-test",Test);lettemplate=html`<app-test.complexProp="${{foo: "something",bar: "something else"}}"></app-test>`;template(document.getElementById("app"));
Instead, the value is still undefined, and in the markup, it appears Arrow is treating .complexProp as an attribute and attempting to serialize it as [Object object] instead:
The same issue occurs if you use a class instance variable instead of a setter and if you use an arrow expression in the template instead of a static expression.
The text was updated successfully, but these errors were encountered:
It appears that IDL attribute handling in Arrow templates is broken in
v1.0.0-alpha.9
. I expected the following code to call the setter forcomplexProp
onTest
and that logging the value inconnectedCallback
would provide the correct value:Instead, the value is still undefined, and in the markup, it appears Arrow is treating
.complexProp
as an attribute and attempting to serialize it as[Object object]
instead:The same issue occurs if you use a class instance variable instead of a setter and if you use an arrow expression in the template instead of a static expression.
The text was updated successfully, but these errors were encountered: