阅读背景:

对象内部的函数获取错误的上下文

来源:互联网 

I have a constructor:

我有一个构造函数:

var ProfileDialog = function (containerObj) {
    this.init = function () {
        this.container = containerObj;
        let content = document.createElement('div');
        content.innerText = 'Dialog here';
        this.container.appendChild(content);
        this.container.style.display = 'none';
    };

    this.init();
};
var Profile



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: