我使用原型扩展一个对象。在嵌套函数中使用 this 并不是指被继承的对象,而是指函数本身。
我尝试扩展的插件已经实现了原型,因此需要定义一个新对象“饥饿”:
var oSausage=function() {
    this.preference='hotdog';
}
oSausage.prototype.hungry={
    getPreference:function() {
        console.log(this.preference)
    },
    another:function() {
    },
    .....
}
有没有办法引用扩展的对象,即 oSausage?