Kill innerHTML (XSS, performance & correctness)
Kill innerHTML (XSS, performance & correctness)

Use DOM APIs instead of innerHTML, because:

.innerHTML += ... breaks invalidates existing event listeners, node
references and expando properties on the node.

.innerHTML = ... user input ... = XSS.

CodeYellowBV/chartist-plugin-legend,CodeYellowBV/chartist-plugin-legend