Goodbye innerHTML, Hello setHTML: Stronger XSS Protection in Firefox 148

61 points by freddyb


hoistbypetard

Nice work! I'm really looking forward to seeing checkmarks spread across this table.

greenheart

This is a major step forward for the web! Imagine how much leaner and faster this will make frontend code when we no longer need to ship JS-based HTML sanitizers.

Though it seems like the biggest benefit for most web apps apart from the improved security will be performance boost of doing a single, native parsing in setHTML() instead of double parsing first with JS and then native in the innerHTML assignment.

Let's hope this will get good browser support as soon as possible!