Invisible Code: Building JavaScript Libraries For Non-Technical People
summary
Argues for concrete fixes: builds an AMP viewer with Preact and TypeScript deployed on thousands of sites, often under 15 kilobytes, using iframes for style isolation and queued work (FPS-based) to avoid blocking. Uses Sentry for sampled error reporting but implements a tiny shim to push events and an API‑fingerprinting system that dynamically polyfills Fetch (wraps jQuery if present). Finds Prototype.js pre‑2012 breaks map’s third arg and adapts accordingly.
AI-written summary · about
chapters (13)
- 0:00Invisible JavaScript libraries
- 2:25Non-technical users add third-party code
- 3:10Constraints of embedded JavaScript
- 5:25Bandwidth and compatibility
- 7:57Style isolation with iframes
- 9:49Pitfalls in embedded libraries
- 13:01Prototype overrides with Sentry
- 16:40Heavy error reporting wrappers
- 18:31Dynamic polyfill loading
- 21:05Performance tips for JavaScript
- 22:41Developer ergonomics
- 25:45Exporting to multiple targets
- 26:09Summary and responsible coding
related talks
21mAsk not what JavaScript can do for you
42mYour library sucks, and why you should use it
40mPIMP Your JS Library or Desgning Non-Shit APIs with JavaScript
38mJavascript Considered...Useful
06mLightning talk from Andrey Sitnik
22mBuilding JavaScript for JavaScripters
26mJavaScript Tools at Scale Using Type Information
24mThe missing guide for deciding between 3rd party library and custom code -JSWORLD 2023
