2016-11-24 2 views
0

관찰 관찰 내 배열을 관찰 할 때 나는 Array.observe 함수하지 않습니다 얻을.자바 스크립트 배열 riot.js <p></p> 그러나와 함께 (편곡, 콜백)

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 
+0

주 전에이 함수를 사용했는데 정상적으로 작동합니다. 그래서 오늘 나는이 행동을 조금 혼란스러워했다. – Fesco

답변

2

Array.observe 방법은 사용되지 않으며 제거되었을 수 있습니다.
대신 Proxy을 사용하는 것이 좋습니다.