如果每个对象都继承自Object,为什么console.log(e.hasOwn(test1.prototype,"eu"))会给出这个错误?function test1() {}
test1.prototype.eu = "true"
this.name = "euler";
var t = new test2()
我认为问题不在于underscore.js,而在于本机原型功能。似乎人们只能直接调用它们,而不是将它们作为回调传递。下面是我不能使用的代码和测试中的错误(使用Mocha.js,只使用相关部分):// => TypeError: String.prototype.toLowerCase called on null or undefined
所以在Node的REPL中尝试过这样
addEditFormString' var wid = new Widget();
问题-在init()方法中,我添加了事件侦听器(addRow方法),但在addRow方法中,我不知道如何捕获构造类的"this“,因为我想调用_addEditFormString()方法,但收到”未捕获TypeError:对象对象窗口没有方法