You can throw away innerHTML and replace it with the new setHTML(), which has a built-in sanitizer.
-
You can throw away innerHTML and replace it with the new setHTML(), which has a built-in sanitizer. Here's how it works:
-
You can throw away innerHTML and replace it with the new setHTML(), which has a built-in sanitizer. Here's how it works:
Here are the full docs https://developer.mozilla.org/en-US/docs/Web/API/HTML_Sanitizer_API
-
Here are the full docs https://developer.mozilla.org/en-US/docs/Web/API/HTML_Sanitizer_API
@firefoxwebdevs awesome! Now we only have to wait for "baseline"

-
@firefoxwebdevs awesome! Now we only have to wait for "baseline"

@xela hopefully it won't be too long! Just Safari to go
-
You can throw away innerHTML and replace it with the new setHTML(), which has a built-in sanitizer. Here's how it works:
@firefoxwebdevs It's back!

-
You can throw away innerHTML and replace it with the new setHTML(), which has a built-in sanitizer. Here's how it works:
@firefoxwebdevs Fantastic! Canβt wait for this to be in baseline!
-
You can throw away innerHTML and replace it with the new setHTML(), which has a built-in sanitizer. Here's how it works:
@firefoxwebdevs this is fantastic! This has bitten me in the past, and I'm excited to be able to use this soon!
-
You can throw away innerHTML and replace it with the new setHTML(), which has a built-in sanitizer. Here's how it works:
@firefoxwebdevs Looks great but why is it called setHTML? What is the βsetβ supposed to mean?
-
@firefoxwebdevs Looks great but why is it called setHTML? What is the βsetβ supposed to mean?
@LeonardoDiOttio I see what you're getting at, but replaceChildrenWithParsedHTML is a bit long.
Fwiw when you set innerHTML you're not really setting the HTML either.