I want to mix an element and a text node so I tried the following code:
struct Elem
{
mixin Node!"div";
@prop innerText = "elem";
}
struct App
{
mixin Node!"div";
@prop innerText = "app";
@child Elem elem;
}
mixin Spa!App;
and expected
but instead got
which I can't explain to myself.
Changing one to textContent and the other to innerText (but not both the same) seems to fix this but that feels like a hack.
I thought maybe adding a @child something = "test"; instead of the innerText prop might be properly handled as text node, but instead that only gave me compilation errors.
I want to mix an element and a text node so I tried the following code:
and expected
but instead got
which I can't explain to myself.
Changing one to textContent and the other to innerText (but not both the same) seems to fix this but that feels like a hack.
I thought maybe adding a
@child something = "test";instead of the innerText prop might be properly handled as text node, but instead that only gave me compilation errors.