I've been encountering more and more sites where basic stuff like cmd+click doesn't work because they used divs + onClick handlers instead.
I've been encountering more and more sites where basic stuff like cmd+click doesn't work because they used divs + onClick handlers instead.
document.body.setHTML(`<h1>Hello my name is <img src="x" onclick="alert('XSS')">`);
translates to ->
<h1>Hello my name is</h1>
This lets you fully configure how HTML strings are cleaned as they're parsed.
hacks.mozilla.org/2026/02/good...
document.body.setHTML(`<h1>Hello my name is <img src="x" onclick="alert('XSS')">`);
translates to ->
<h1>Hello my name is</h1>
www.wowhead.com/npc=252571/o...
www.wowhead.com/npc=252570/c...
www.wowhead.com/npc=252571/o...
www.wowhead.com/npc=252570/c...
<head>
<title>Free Headpats</title>
<script>
function giveHeadpat() {
alert("thx :3333");
}
</script>
</head>
<body>
<button onclick="giveHeadpat()">Click to give headpats</button>
</body>
</html>
<p>Hello world </p>
<hr />
<head>
<title>Free Headpats</title>
<script>
function giveHeadpat() {
alert("thx :3333");
}
</script>
</head>
<body>
<button onclick="giveHeadpat()">Click to give headpats</button>
</body>
</html>
Enters the room 😭
Enters the room 😭
also great for accessibility
also great for accessibility
When did we stop teaching front end devs how to write html? 😭
I’ve had this issues with juniors using div+onClick instead of buttons too
When did we stop teaching front end devs how to write html? 😭
I’ve had this issues with juniors using div+onClick instead of buttons too
Explore the full CSS Wrapped list → goo.gle/CSSWrapped25
Explore the full CSS Wrapped list → goo.gle/CSSWrapped25
I've set the Steam Deck touchscreen mode to Touch API Pass-through in Steamworks.
Now the game does register my touch like a touchscreen but it doesn't click! It highlights the buttons but doesn't run OnClick.
I've set the Steam Deck touchscreen mode to Touch API Pass-through in Steamworks.
Now the game does register my touch like a touchscreen but it doesn't click! It highlights the buttons but doesn't run OnClick.
#JSX support in the browser would most likely be a net positive
I don't mean
I mean
HTML anchored syntax in JS
It would be property-based, not attribute-based
CSP-safe
Don't come at me, it's just an idea 😅
#javascript #webdev #dev #frontend
#JSX support in the browser would most likely be a net positive
I don't mean
I mean
HTML anchored syntax in JS
It would be property-based, not attribute-based
CSP-safe
Don't come at me, it's just an idea 😅
#javascript #webdev #dev #frontend
Sign in to LightNews
Don't have an account?
Connect Bluesky
Enter your Bluesky handle and app password to unlock posting, likes, and your Following feed.
Need an app password? Open Bluesky, go to Settings > App passwords, and create a new one.
Connect with Bluesky
Sign in with your Bluesky account to unlock posting, likes, and your Following feed.