So i’m trying to get my head around when attached() gets called if there’s a repeater in the template.
E.g.
<div class="parent">
<p repeat.for="thing of things">${thing}</p>
</div>
Now in attached:
attached() {
const parent = document.querySelector('.parent');
console.log(parent.offsetWidth);
}
Width will always be 0. If i wrap it in a setTimeout of 0 seconds then it’ll be the correct width.
Is there a way to make sure the repeated elements have rendered fully before any functions in attached() run?