Grainular-Nord / nord

A lightweight (8kb), dependency-free JavaScript Frontend Framework
https://nordjs.dev
MIT License
7 stars 0 forks source link

[BUG] Nodelists inside Grains don't get rendered to the template #84

Open IamSebastianDev opened 9 months ago

IamSebastianDev commented 9 months ago

Bug Description

Overview: When storing a NodeList inside a Grain, a [Object NodeList] text is inserted instead of the NodeList. The parser incorrectly inserts all values inside a grain as string, even though they could be inserted as Node.

Expected Behavior: NodeList is inserted as string

Actual Behavior: NodeList is inserted as Nodes

Steps to Reproduce 🔄

  1. ...

Environment Information 🌐

Additional Context


IamSebastianDev commented 9 months ago

After further investigation, this appears to be working as intended. All grain values get inserted as text node, least of all to ensure that parsing of attributes does not get disturbed. Something we could consider is creating a 'template' directive, that renderes such node lists.