当前位置:网站首页>DOM event flow event bubble event capture event delegate
DOM event flow event bubble event capture event delegate
2022-07-26 05:11:00 【rananie】
List of articles
DOM Flow of events

Interview questions
- Event delegation , Advantages of event proxies
- The process of event capture and bubbling
- Event bubbling and delegation ? Use scenarios ?
- JS Principle of event binding
- When to use bubble ? When to use capture ?
Event bubbling and event capture
Purpose : Solve the flow of events in the page ( Sequence of events ) The problem of
- Event Bubbling : Deliver events from the inside out
- Event capture : Pass events from outside to inside
When binding event listening , The third parameter can set the stage at which the event is executed , The default is the event bubble stage
DOM The three phases of the event flow are the capture phase -> Target stage -> bubbling phase .
When the event is in the target stage , The order of event calling depends on the writing order of the bound event
Event agent - Using the event bubbling mechanism
Event agent : Event broker is to use the mechanism of event bubble or event capture to bind a series of inner element events to outer element events .
The benefits of event delegation
- Reduce the number of event listening bindings , Reduce memory usage , Lifting performance
- Added after the bound event pair DOM Node is still valid
边栏推荐
猜你喜欢

没背景、没学历?专科测试员进入互联网大厂是不是真的没希望?

MODFLOW flex, GMS, FEFLOW, hydraus practical application

阿里云工业视觉智能工程师ACP认证——备考

Week 6 Learning Representation: Word Embedding (symbolic →numeric)

第二讲 初识SLAM

Learn to map with nature medicine -- complex heat map

Mysql主从同步及主从同步延迟解决方案

黑吃黑?男子破解赌博网站漏洞,每月“薅羊毛”10多万元

分子骨架跃迁工具-DeLinker介绍

MODFLOW Flex、GMS、FEFLOW、HYDRUS实践应用
随机推荐
What are the characteristics of the grammar of Russian documents in the translation of scientific papers
Learn to map with nature medicine -- complex heat map
ABAP语法学习(ALV)
汉字风格迁移篇---通过生成对抗网络学习一对多程式化汉字的转换和生成
Redis过期删除策略和内存淘汰策略
迁移服务器,重新配置数据库(数据库无监听,启动监听报TNS-12545、TNS-12560、TNS-00515错误)
Teach you how to use code to realize SSO single sign on
【Leetcode】493. Reverse Pairs
Mysql优化
How to connect tdengine through idea database management tool?
Annotation @autowired how to assemble automatically
【洛谷】P1383 高级打字机
AQS唤醒线程的时候为什么从后向前遍历,我懂了
Distance between bus stops: simple simulation problem
Alibaba cloud industrial vision intelligent engineer ACP certification - Preparation
ThreadLocal transfer between parent and child threads in asynchronous
新导则下的防洪评价报告编制方法及洪水建模
Week 6 Learning Representation: Word Embedding (symbolic →numeric)
Date and time function of MySQL function summary
DOM事件流 事件冒泡-事件捕获-事件委托