与riot.js一起观察(arr,回调)
但是当我尝试观察我的数组时,我得到 Array.observe不是函数。
Array.observe(this.nodes, function (changes)
{
//do some stuff
tag.update();
});
错误
Uncaught TypeError: Array.observe is not a function(…)(anonymous function)
@components/breadcrumb-navigation.tag.js:3(anonymous function)
@ riot+compiler.js:1604(anonymous function)
@ riot+compiler.js:1719each
@ riot+compiler.js:1921toggle
@ riot+compiler.js:1719(anonymous function)
@ riot+compiler.js:1610mountTo
@ riot+compiler.js:2417pushTags
@ riot+compiler.js:2557each
@ riot+compiler.js:1921pushTags
@ riot+compiler.js:2561riot.mount
@ riot+compiler.js:2612(anonymous function)
@ riot+compiler.js:3497done
@ riot+compiler.js:3414compileTag
@ riot+compiler.js:3421GET.req.onreadystatechange
@ riot+compiler.js:3381