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
Element property syntax not working #86
Comments
I'm experiencing the same issue. Custom IDL attributes will not pass through the template. import { reactive, html } from 'https://esm.sh/@arrow-js/core';
if ('customElements' in window) {
customElements.define(
'custom-element',
class Test extends HTMLElement {
value;
constructor() {
super();
}
get value() {
return this.value;
}
set value(value) {
this.value = value;
}
connectedCallback() {
console.log(this.value);
}
}
);
}
const render = html`<custom-element .value="${() => 1}"></custom-element>`;
render(document.querySelector('body')); results in the following DOM (and <custom-element .value="<!--➳❍-->"></custom-element> This is occurring on both |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: