开发者

JS: I'm not getting the scope

开发者 https://www.devze.com 2023-01-03 22:22 出处:网络
I\'m trying to modify CouchDB\'s JS API to work asynchronous, but there is an error I cannot solve: Please find my JS API find at pastebin.

I'm trying to modify CouchDB's JS API to work asynchronous, but there is an error I cannot solve:

Please find my JS API find at pastebin. If I call (new CouchDB("dbname")).allDocs(function(result) {console.log(result)}) (line 193) I get an error because the okCallback function is not defined in the callback开发者_如何学Go function.

I don't know why; it should be defined in this scope..

Any hints are very welcome!

Cheers, Manuel


designDocs takes okCallback as a parameter. You are not passing a parameter when you call the function. Hence, the value is undefined.

0

精彩评论

暂无评论...
验证码 换一张
取 消