How much should I care about bad markup due to a user's manual changes?
Answered
Rose-breasted Grosbeak posted this in #help-forum
Rose-breasted GrosbeakOP
Do you care about your DOM being manipulated by inspect?
Maybe people don't think about it using frameworks, and in frameworks like react, maybe it's not necessary, but using raw DOM manipulation, TS is always paranoid.
Let's say there's an input, and a div, which shows an error message for the input. Someone could delete that div, (using inspect) but the variable holding its reference wouldn't know it, and next time it'll just throw.
So, how much should I care about this?
Maybe people don't think about it using frameworks, and in frameworks like react, maybe it's not necessary, but using raw DOM manipulation, TS is always paranoid.
Let's say there's an input, and a div, which shows an error message for the input. Someone could delete that div, (using inspect) but the variable holding its reference wouldn't know it, and next time it'll just throw.
So, how much should I care about this?
Answered by joulev
nothing. the user fucks around, then they find out. nothing bizarre.
as long as all the user can affect is just the frontend, and the user cannot, say, delete your database just by fucking around in the frontend, it's fine
as long as all the user can affect is just the frontend, and the user cannot, say, delete your database just by fucking around in the frontend, it's fine
3 Replies
Rose-breasted GrosbeakOP
Should I add checks, always making sure if the reference is valid before running a function?
or Should I let it throw?
or Should I only do it in "init" functions?
or Should I let it throw?
or Should I only do it in "init" functions?
nothing. the user fucks around, then they find out. nothing bizarre.
as long as all the user can affect is just the frontend, and the user cannot, say, delete your database just by fucking around in the frontend, it's fine
as long as all the user can affect is just the frontend, and the user cannot, say, delete your database just by fucking around in the frontend, it's fine
Answer
Rose-breasted GrosbeakOP
Thanks for the validation