Skip to content

Commit

Permalink
fix bug, add content of VueRouter
Browse files Browse the repository at this point in the history
  • Loading branch information
YuChengKai committed Jul 28, 2018
1 parent 2b6675a commit 81e365b
Show file tree
Hide file tree
Showing 6 changed files with 928 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Browser/browser-ch.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,9 @@ setTimeout(()=>{
}, 0)

// 以上代码在浏览器和 node 中打印情况是不同的
// 浏览器中打印 timer1, promise1, timer2, promise2
// node 中打印 timer1, timer2, promise1, promise2
// 浏览器中一定打印 timer1, promise1, timer2, promise2
// node 中可能打印 timer1, timer2, promise1, promise2
// 也可能打印 timer1, promise1, timer2, promise2
```

Node 中的 `process.nextTick` 会先于其他 microtask 执行。
Expand Down
3 changes: 2 additions & 1 deletion Browser/browser-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ setTimeout(()=>{
}, 0)
// The log result is different, when the above code is executed in browser and node
// In browser, it will log: timer1 => promise1 => timer2 => promise2
// In node, it will log: timer1 => timer2 => promise1 => promise2
// In node, it may log: timer1 => timer2 => promise1 => promise2
// or timer1, promise1, timer2, promise2
```

`process.nextTick` in Node will be executed before other microtasks.
Expand Down
Loading

0 comments on commit 81e365b

Please sign in to comment.