We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e422d95 commit e0fbc20Copy full SHA for e0fbc20
src/utils.js
@@ -2,13 +2,17 @@ var config = require('./config'),
2
toString = ({}).toString,
3
win = window,
4
console = win.console,
5
- timeout = win.setTimeout,
6
def = Object.defineProperty,
7
OBJECT = 'object',
8
THIS_RE = /[^\w]this[^\w]/,
9
hasClassList = 'classList' in document.documentElement,
10
ViewModel // late def
11
+var defer =
12
+ win.requestAnimationFrame ||
13
+ win.webkitRequestAnimationFrame ||
14
+ win.setTimeout
15
+
16
var utils = module.exports = {
17
18
/**
@@ -225,7 +229,7 @@ var utils = module.exports = {
225
229
* used to defer batch updates
226
230
*/
227
231
nextTick: function (cb) {
228
- timeout(cb, 0)
232
+ defer(cb, 0)
233
},
234
235
0 commit comments