Firefox for Web Developers @webdevs.firefox.com 路 Feb 25

You can throw away innerHTML and replace it with the new setHTML(), which has a built-in sanitizer. Here's how it works:

156 likes 6 replies

?

Replies

Xerz 馃挆 路 Feb 25

Micha毛l Vanderheyden 路 Feb 25

Can't wait to get rid of all the custom sanitzer functions. This is both a security improvement but mostly a improvement in DX 鈽猴笍

Orangetronic 路 Feb 25

馃槷

@winfredjj.bsky.social 路 Feb 25

nice and simple explanation

Ilja 路 Feb 25

Any chance to polyfill or mock this?