Building custom widgets with the closure library
summary
Claim: the Closure Library framework makes custom widgets quick to write and safe to tear down. It uses goog.ui.Component lifecycle methods (createDom enterDocument exitDocument dispose), Closure tools (compiler templates) plus a Timer and event handlers; the demo builds a working countdown widget that ticks every second (interval = 1s starts at ~27s) and reports milliseconds on mouseover. Gotcha: live goog.require script tag injection makes many requests and unminified code; bundling or Closure Compiler (simple or advanced) fixes performance.
AI-written summary · about
chapters (14)
- 0:00Intro
- 2:22Closure tools
- 2:52Cloudkick
- 3:10Custom widgets
- 5:11Widget Lifecycle
- 7:15Idea
- 7:39Class system
- 8:21Warning
- 9:07The stub
- 13:45Opening the demo
- 14:50Testing the widget
- 16:45A better way
- 17:06Deployment
- 18:30Questions
related talks
42mAutopsy of a Widget
29mBreak out from the framework: Web Components to the rescue
45mLet's Talk About Web Components
29mInspector Web and the Mystery of the Shadow DOM
44mWeb Components An Introduction to the Future
42mThe Good, The Bad, The Web Components
24mThe Good, The Bad, and The Web Components
40mWeb Components: It’s about Time
