Files
front-end-example/04-dom-events-async/06-bubbling-and-delegation/starter.js
charlie f3bdaa4e88 feat: add TypeScript lessons and learning panel
- Introduced a new script to check TypeScript lesson files for errors.
- Created a main TypeScript file to render lessons and their details.
- Added lesson definitions with starter and answer codes.
- Implemented a user interface for navigating and running lessons.
- Styled the application with CSS for a better user experience.
- Updated README to reflect the new TypeScript section and usage instructions.
2026-03-19 10:06:11 +08:00

6 lines
232 B
JavaScript

// 任务:
// 1. 给 panel 绑定点击事件,输出一条日志
// 2. 给 lesson-list 绑定点击事件,使用事件委托
// 3. 点击 li 时切换 active 类名
// 4. 点击删除按钮时,阻止冒泡并删除当前 li