sugarlabs / sugar-web

Components for Sugar web activities
Apache License 2.0
13 stars 32 forks source link

ActivityPalette: write HTML directly #70

Closed manuq closed 11 years ago

manuq commented 11 years ago

We don't need Mustache because there are no variables.

dnarvaez commented 11 years ago

When do you think we should use an html string vs dom?

An interesting reading https://groups.google.com/d/topic/mozilla.dev.b2g/I-Wuqj7ux0A/discussion

dnarvaez commented 11 years ago

Feel free to push with the nitpick

manuq commented 11 years ago

Thanks Daniel. As said on IRC, we must avoid innerHTML when there is user input involved, for security. In other cases, I prefer to write HTML in HTML instead of doing the same with many JS calls, and it seems to have better performance: http://jsperf.com/innerhtml-vs-appendchild-one