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?
Comments
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?
Your views are compiled down to JavaScript beforehand. Your example would be compiled to something like:
Use Moon.compile(template) to get a better idea of outputs.