当前位置:网站首页>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
边栏推荐
猜你喜欢
![[acwing] 2983. Toys](/img/e4/f71949a00ae604703d2b39bffb7c80.png)
[acwing] 2983. Toys

Redis solves the problem of oversold inventory

LeetCode链表问题——206.反转链表(一题一文学会链表)

提高shuffle操作中的reduce并行度

Install nccl \ mpirun \ horovod \ NVIDIA tensorflow (3090ti)

Please elaborate on the implementation principle of synchronized and related locks

An online accident, I suddenly realized the essence of asynchrony

JVM Lecture 5: how to deal with peak push of vertical and horizontal data

Full analysis of domain name resolution process means better text understanding

【pytorch】torch1.8.1安装、查看torch版本、GPU是否可用
随机推荐
BigDecimal 的 4 个坑,你踩过几个?
【洛谷】P3919 【模板】可持久化线段树1(可持久化数组)
CountLaunch Demo的测试
Switch and router technology: dynamic routing protocol, rip routing protocol and OSPF routing protocol
Test of countlaunch demo
LeetCode链表问题——206.反转链表(一题一文学会链表)
五个维度着手MySQL的优化,我和面试官都聊嗨了
CLM land surface process model
JVM Lecture 2: class loading mechanism
奥特学园ROS笔记--6
Week 6 Learning Representation: Word Embedding (symbolic →numeric)
Computable general equilibrium (CGE) model practice technology in resource environment under the goal of "double carbon"
域名解析过程全分析,就着文字理解更佳
提高shuffle操作中的reduce并行度
The pit of history can only be filled up as far as possible
阿里云工业视觉智能工程师ACP认证——备考
“双碳”目标下资源环境中的可计算一般均衡(CGE)模型实践技术
MySQL master-slave synchronization and master-slave synchronization delay solution
分布式ID的常用解决方案-一把拿下
JVM第六讲:线上环境 FGC 频繁,如何解决?