webtides / luna-js

MIT License
8 stars 0 forks source link

☠️ Death Loop on Element recursive rendering #117

Open quarkus opened 1 year ago

quarkus commented 1 year ago

If an Element renders itself luna will be stuck in an endless loop while indexing the Template looking for Elements.

https://github.com/webtides/luna-js/blob/bc25f7a48b8f60d12bdde07fc70701be0f4a70a5/packages/luna/src/framework/engine/document-renderer.js#L153

class DeadElement extends TemplateElement {
template () html`<dead-element></dead-element>`
}

class ZombieElement extends TemplateElement {
template () html`<!-- OR just <zombie-element></zombie-element> -->`
}