Errors and releases that break pages · core
Browser support: syntax versus APIs
A new language feature can work on your machine and fail on one browser version. Build tools rewrite new syntax but do not add missing built-in methods, so you need a polyfill or different code.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- A button that does nothing, a TypeError on one browser version only, and no network request point to a handler that fails before the call. Filter the error tracker by browser.
- Example: Object.groupBy is fully supported in Safari from 17.4 (March 2024). The build rewrote syntax but added no polyfill for the missing method.
- Syntax versus API: Babel or SWC can rewrite syntax, but a missing method needs a polyfill (core-js) or different code.
- Some features fail when the file is parsed and break the whole file, like regex lookbehind before Safari 16.4.
- Fix: a small helper instead of the method, or a targeted polyfill. Set browserslist from real user analytics and check it in CI (for example an ES-compatibility lint rule).
- Test the main flows on real old devices, for example through a cloud device service.
- Prevent: an error alert per browser on checkout, a staged rollout, and Baseline checks in code review.
- Stopgap: support suggests another browser, and you count the lost orders to show the impact.
The red pen
Common traps: mistake → fix
Mistake: Babel or SWC fixes every compatibility problem
Fix: they rewrite syntax only, not missing methods.
Mistake: Chrome works, so it is fine
Fix: many users are on older Safari and Android browsers.
Mistake: An error boundary shows the error to the user
Fix: handler errors are not caught by it, so the UI shows nothing.
Easy to hard
Questions interviewers ask, easy to hard
- The checkout button does nothing on Safari only. What do you do?
- What is the difference between syntax and API support?
- How do you choose which browsers to support?
- How do you stop this from reaching production again?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.