当前位置:网站首页>^29 event cycle model
^29 event cycle model
2022-06-10 21:09:00 【sanda_ nd】
1、 All code categories :
- Initialize the execution code ( Synchronization code ): Include binding DOM Event monitoring 、 Set the timer 、 happen ajax Requested code
- Callback execution code ( Asynchronous code ): Handle callback logic
2、JS The basic flow of engine execution code
Initialization code => callback code
3、 Two important components of the model
Event management module
The callback queue
4、 The operation process of the model
- Execute initialization code , Give the event callback function to the corresponding module for management
- When the event occurs , The management module will add the callback function and its data to the callback queue
- Only after the initialization code is executed ( It may take some time ), Will traverse the callback function execution in the callback queue

5、 Important concepts
(1、 Execution stack : All code is executed in this space )
(2、 Browser kernel :JS Engine modules ( The main thread )、 Other modules ( Lord / Sub thread ))
(3、 Task queue )
(4、 Message queue )
(5、 Event queue )
3、4、5 In the same callback queue
(6、 Event polling : Take the callback function from the task queue and put it into the execution stack )
(7、 Event driven model : Upper figure )
(8、 Request response model : browser 、 Transfer data between servers )
边栏推荐
- Knife4j configuration can use direct copy
- 35岁被裁员,还能拥有美妙人生吗?
- User defined date component. The left and right buttons control forward or backward year, month, week and day turning
- 力扣1082,1084题解_sql查询类型的题目
- 聊聊服务器性能优化~(建议收藏)
- Mixin -- mixed
- 中衍期货公司是国内的正规平台吗?开户安全吗?想开个期货账户
- Knowledge map / relationship visualization
- P5723 【深基4.例13】质数口袋
- 中衍期货靠谱吗?是不是正规期货公司?开户安全吗?
猜你喜欢

What is the difference between localhost and 127.0.0.1?

六级考试-商务英语-考前最后一背

Magic tower game implementation source code and level generation

Fast Planner - detailed explanation of kinetic astar

游戏兼容性测试(通用方案)

pytorch深度学习——神经网络卷积层Conv2d

Arduino中Serial.print()与Serial.write()函数的区别,以及串口通信中十六进制与字符串的收发格式问题和转换过程详解

Diablo immortal wiki address Diablo immortal database address sharing

canvas 高级功能(上)

Service management and communication, basic principle analysis
随机推荐
详解三级缓存解决循环依赖
Nanny tutorial: how to become a contributor to Apache linkis documents
魔塔类游戏实现源码及关卡生成
Theoretical basis of distributed services
[generation confrontation network learning part I] classic Gan and its existing problems and related improvements
用一个性能提升了666倍的小案例说明在TiDB中正确使用索引的重要性
游戏兼容性测试(通用方案)
PDF. JS - - - - JS analyse le fichier PDF pour réaliser l'aperçu et obtenir le contenu du fichier PDF (sous forme de tableau)
A small case with 666 times performance improvement illustrates the importance of using indexes correctly in tidb
分布式服务理论基础
Explain L3 cache to solve circular dependency
Heap sorting and hardening heap code for memory
Elastic-Job的快速入门,三分钟带你体验分布式定时任务
redis设置密码命令(临时密码)
请问九洲期货是正规的吗?开户安不安全
Test APK exception control netlocation attacker development
自注意力(self-attention)和多头注意力(multi-head attention)
Stacked bar graph move the mouse into the tooltip to prompt that the filter is 0 element, so as to realize custom bubbles
AttributeError: module ‘collections‘ has no attribute ‘MutableMapping‘
Arduino中Serial.print()与Serial.write()函数的区别,以及串口通信中十六进制与字符串的收发格式问题和转换过程详解