~/talk

Squashing JavaScript Bugs

Talkat NDC Sydney 2017 · 2017-08-14..08-18· [javascript, web-performance, web-platform]
slides:none on file

A buggy demo app called getRanter gets debugged live using Chrome DevTools and shows concrete fixes: add event.preventDefault to stop form submits, bind or arrow functions to fix lost this in setTimeout, and change conditional checks so the draft saved in localStorage key "nextRant" can be an empty string. Monitoring via TrackJS surfaces 237 API 400s. A memory leak caused 100KB allocations every 10s; clearing render state with children.length = 0 drops retained growth to ~10KB.

AI-written summary · about

  1. 0:00Start
  2. 5:07Impersonate Real Users
  3. 7:55Elements Panel
  4. 8:40Event Listener Tab
  5. 10:55Event Delegation Pattern
  6. 16:33Async Stack Traces
  7. 18:31Breakpoints
  8. 20:38Dot Bind on Functions
  9. 21:40Fat Arrow Function
  10. 25:14Element Inspector
  11. 27:24Local Storage
  12. 33:05The Worst Place To Catch a Bug
  13. 44:18Record Allocation Timeline
  14. 1:00:45Memory Bug
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.