Browser Extension Developer
A path for browser extension developers: web components, content scripts, background messaging, CSP, caching, and DOM event handling.
Path overview
浏览器扩展运行在宿主页面与后台脚本之间,需要同时处理 DOM 注入、跨上下文通信、内容安全策略与资源缓存。本路径从 Web Components 与内容脚本的 DOM 基础入手,逐步覆盖数据抓取与缓存、CSP/CORS 约束、实时消息通道以及浏览器内存泄漏排查。
This path equips browser extension developers with the platform fundamentals they actually use: web components and content scripts, data fetching and caching, CSP and CORS boundaries, real-time messaging, and memory-leak debugging.
Run the browser extension snippet "Custom Elements API", capture stdout, and show which line demonstrates the documented behavior: "Defines a custom HTML element with lifecycle callbacks, observed attributes, and Shadow DOM".
Next step: Slots for Web Component Composition
⏱ 0.75h
Adapt "Slots for Web Component Composition" to a second input and compare the new output with the behavior described in "Uses slot elements with named and default slots to create flexible web component templates".
Prerequisites: Custom Elements API
Next step: Template Element for Reusable HTML
⏱ 0.75h
Execute "Template Element for Reusable HTML", change one constant, and describe how the output diverges from "Uses the template element to define reusable HTML fragments that can be cloned and inserted".
Prerequisites: Slots for Web Component Composition
Next step: Data Attributes for Custom Data
⏱ 0.75h
Run the browser extension snippet "Data Attributes for Custom Data", capture stdout, and show which line demonstrates the documented behavior: "Uses data attributes to store custom data in HTML elements, accessed via JavaScript dataset".
Prerequisites: Template Element for Reusable HTML
Next step: Vanilla JavaScript Data Fetching
⏱ 0.75h
Adapt "Vanilla JavaScript Data Fetching" to a second input and compare the new output with the behavior described in "Fetch and render remote data with vanilla JavaScript using async/await, AbortController for".
Prerequisites: Data Attributes for Custom Data
Next step: JavaScript Fetch with Caching
⏱ 0.75h
Execute "JavaScript Fetch with Caching", change one constant, and describe how the output diverges from "Implement a cached fetch wrapper in vanilla JavaScript using the Cache API with".
Prerequisites: Vanilla JavaScript Data Fetching
Next step: Building Real-time Features with WebSockets
⏱ 0.75h
Reconstruct the reasoning behind "Building Real-time Features with WebSockets" by tracing "The Connection Lifecycle" to the failure it prevents in browser extension systems.
Next step: DOM Event Propagation Visualizer
⏱ 1h
Run two different inputs through "DOM Event Propagation Visualizer" and show where the outputs diverge.
Next step: Typed Web Streams Transform Pipeline
⏱ 0.25h
Execute "Typed Web Streams Transform Pipeline", change one constant, and describe how the output diverges from "Split byte chunks into decoded text lines with a TransformStream, enforce a line-size".
Prerequisites: DOM Event Propagation Visualizer
Next step: Validate Browser Extension Message Routing
⏱ 0.75h
In the "Browser Extension Developer" path, implement "Validate Browser Extension Message Routing" so JSON object: { routes: { [sender]: string[] }, messages: [{ from, to, yields {routed:[m1],rejected:[{id:m2,reason:route-not-allowed}]}, including the second sample's edge case.
Prerequisites: Typed Web Streams Transform Pipeline
Next step: Capstone: Browser Extension Developer
⏱ 0.42h
Ship "SSRF guard" from "Build a URL Metadata Scraper Service", then prove it with the project's test suite and an acceptance note.
Prerequisites: Typed Web Streams Transform Pipeline, Validate Browser Extension Message Routing
Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.
⏱ 4h