2 ms·
How are variables in "<p>{text}</p>" replaced? Is the security of it just an implementation detail left to the programmer who use it? Safe way would be finding
by dvh 8y ago
How are variables in "<p>{text}</p>" replaced? Is the security of it just an implementation detail left to the programmer who use it? Safe way would be finding the P and then doing p.textContent = data. But how do you find element by value efficiently? Or do you just to text replace?
- kbr 8y agoYour views are compiled down to JavaScript beforehand. Your example would be compiled to something like: m2.textContent = instance.text; Use Moon.compile(template) to get a better idea of outputs.