fac18 / week3-DFJL-bday-time-machine

Go back in time to the day of your birth. What were the cultural touchstones of the moment!?
0 stars 2 forks source link

Security #34

Closed tonylomax closed 4 years ago

tonylomax commented 4 years ago

Georgia and I mentioned avoiding using inner.HTML to set text content. In the grand scheme of things it's not too bad in this context as you're never allowing the user to access this part of the code and it's only used to clear things before you re-render. However, I'd get in the habit of not using it as textContent does the same thing and doesn't have related issues.

Read the top response - https://www.reddit.com/r/learnjavascript/comments/9502x5/is_innerhtml_still_considered_bad/