frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Why is appending to the innerHTML property bad?

https://stackoverflow.com/a/33995479/1201863
4•lucgommans•1d ago

Comments

lucgommans•1d ago
I knew changing innerHTML had some side effects, but this answer shows just how many corner cases it causes and offers a drop-in replacement at least for appending. Thought other developers on this site would also be interested to learn this
baobun•1d ago
Deeper than the practical consequences in the answer is the fundamental issue of mixing code with data and operating on the DOM with plaintext HTML like that. It's an antipattern in general. Compare to eval() on JS. Or SQL injection.

When you're dynamically manipulating a DOM, ideally you want to do so by the more semantic APIs. E.g. https://developer.mozilla.org/en-US/docs/Web/API/Node/append...

(Not to say that there aren't valid use-cases e.g. when views may be loaded from remotes but if you're constructing the view on the client, best to avoid treating the DOM or its nodes as HTML)

Show HN: Visualize your work cycles to see where your time goes

https://perspectask.com/productivity-methods/time-tracking-graph
1•alexandroo•56s ago•0 comments

Show HN: Put macros.menu/ in front of any restaurant menu URL

https://macros.menu
1•Sawpaw19•1m ago•0 comments

Enzymes from Scratch

https://news.ucsb.edu/2025/021875/enzymes-scratch
1•geox•1m ago•0 comments

Android and Wear OS are getting a big refresh

https://blog.google/products/android/material-3-expressive-android-wearos-launch/
1•whatever3•1m ago•0 comments

SpaceX Employee with Crohn's Was Fired for Needing the Bathroom Too Often

https://gizmodo.com/spacex-employee-with-crohns-says-he-was-fired-for-needing-the-bathroom-too-often-2000601495
1•doener•1m ago•0 comments

Airbnb Is in Midlife Crisis Mode

https://www.wired.com/story/airbnb-is-in-midlife-crisis-mode-reinvention-app-services/
1•thomasjudge•3m ago•1 comments

.NET 10 Preview 4 is now available

https://devblogs.microsoft.com/dotnet/dotnet-10-preview-4/
1•vyrotek•6m ago•0 comments

Building, launching, and scaling ChatGPT Images

https://newsletter.pragmaticengineer.com/p/chatgpt-images
1•mfiguiere•8m ago•0 comments

Returning to My Roots in Hardware

https://dancrimp.nz/2025/03/31/hardware/
1•dcrimp•8m ago•0 comments

Jack Clark on AI's Uneven Impact (Ep. 242)

https://conversationswithtyler.com/episodes/jack-clark/
1•paulpauper•9m ago•0 comments

Econ 101 Is Underrated: Pharma Price Controls

https://marginalrevolution.com/marginalrevolution/2025/05/econ-101-is-underrated.html
2•paulpauper•9m ago•0 comments

No mass shootings so far this year in America

https://www.washingtonpost.com/opinions/2025/05/12/mass-shootings-decline/
1•paulpauper•10m ago•0 comments

Airbnb Announces "Services" and "Experiences"

https://www.airbnb.com/release
1•FlamingMoe•11m ago•0 comments

The Slow Winter (2013) [pdf]

https://scholar.harvard.edu/files/mickens/files/theslowwinter.pdf
1•HeliumHydride•12m ago•0 comments

Alan Smithee

https://en.wikipedia.org/wiki/Alan_Smithee
2•thunderbong•13m ago•0 comments

Show HN: OCR Workbench: AI OCR for hard documents

https://github.com/viking2917/ocr-workbench
1•viking2917•14m ago•0 comments

Lzexe – executable file compression on MSDOS

https://cosmodoc.org/topics/lzexe/
1•todsacerdoti•15m ago•0 comments

Mortgage Your 401(k)

https://www.bloomberg.com/opinion/newsletters/2025-05-13/mortgage-your-401-k
2•ioblomov•16m ago•1 comments

The Surreal Landscapes of Industrial Waste in Russia

https://www.comradegallery.com/journal/photo-essay-the-unworldly-photos-of-industrial-waste-pollution-landscapes-in-russia-environmental-policy
5•silverkite•16m ago•0 comments

Microsoft cuts nearly 3% of global workforce, about 6k jobs, for efficiency

https://www.geekwire.com/2025/microsoft-cuts-nearly-3-of-global-workforce-about-6000-jobs-in-latest-push-for-efficiency/
1•withinrafael•18m ago•0 comments

Chinese Cars Will Enter the U.S. Market, Say Auto Execs

https://insideevs.com/news/759341/automakers-survey-chinese-cars-us/
1•ryan_j_naughton•18m ago•0 comments

I (kind of) killed Mercurial at Mozilla

https://glandium.org/blog/?p=4346
2•executesorder66•19m ago•0 comments

AI chatbot psychologists are claiming to be fully licensed

https://sfstandard.com/2025/05/11/ai-chatbots-fake-therapists/
6•ohjeez•20m ago•0 comments

PhD students bring AI Coaching to Japan

https://www.miragenews.com/uf-doctoral-students-bring-ai-coaching-to-japan-1459499/
1•MarcoDewey•21m ago•0 comments

Building Effective AI Agents

https://www.anthropic.com/engineering/building-effective-agents
2•tosh•22m ago•0 comments

Show HN: Added Kubernetes Troubleshooting Resource

https://interview.devopscommunity.in/topic/kubernetes-troubleshooting
1•rohitghumare•23m ago•0 comments

It's 2025–Why Are Banks Still Getting Authentication So Wrong?

https://jamal.haba.sh/its-2025-why-are-banks-still-getting-authentication-so-wrong/
52•kamikazee•24m ago•18 comments

Can a $700 Calendar Save Your Marriage?

https://www.nytimes.com/2025/05/12/style/skylight-hearth-digital-calendars-marriage.html
1•mitchbob•24m ago•1 comments

Show HN: ChatGPT's Operator, Now Built into the Browser [Operator](Open Source)

https://github.com/tysonthomas9/browser-operator-devtools-frontend
1•tysont9•27m ago•0 comments

Epoch AI Is hiring a engineering lead for AI benchmarking

https://careers.epoch.ai/postings/a222f118-4153-4aac-8f67-484328df3d50
2•EpochAI•27m ago•1 comments