fac-14 / teamcoolerweek-2

To-do-list project
1 stars 1 forks source link

InnerHTML #30

Closed iPhatty closed 6 years ago

iPhatty commented 6 years ago

https://github.com/fac-14/teamcoolerweek-2/blob/4b588fb49da82ef7d3bdaea8458d8c7c54c80362/dom.js#L29

InnerHTML here is most likely safe and wouldn't cause any security issues, but it should be a last resort. Maybe try and find an alternative like appending an img element to the button instead?

I found online a way to do it using CSS and giving the button a background Link here!

sbinlondon commented 6 years ago

Thanks for the link, we'll definitely check that out @iPhatty 🎉