广播-订阅
前端通知客户端某个事件,通过iframe 与 相应的 schema 来进行实现
监控 定位 window.onerror 与 window.addEventListener('load') 区别
拦截 console.log
mounted () {
this.data.message = '1'; -> watcher
this.data.message = '2'; -> watcher
this.data.message = '3'; ->
this.render(); -> micro task
}
assignment --- 同步更新-宏任务
---- 所有微任务 this.render
UI render
---- 宏任务 <----
所有微任务
function get() {
// 请补全函数参数和实现逻辑
}
const obj = { selector: { to: { toutiao: 'FE coder' } }, target: [1, 2, { name: 'byted' }] };
// 运行代码get(obj, 'selector.to.toutiao', 'target[0]', 'target[2].name')
// 输出结果:// ['FE coder', 1, 'byted']
obj['selector.to.toutiao'] = undefined;
obj.0 xxxx
网友评论