MyLibrary.MyModule =
(
function initialise() {
this.id = id;
this.c = document.getElementById(id);
this.ctx = this.c.getContext('2d');
this.properties = {
setup: {
backgroundColour: options.setup.backgroundColour || 'black'
},
scale: {
show: options.scale.show || true,
colour: options.scale.color || 'white'
},
}
console.log(properties.setup.baseFontSize);
}
)(id, options);
我正在使用调用此代码
new MyLibrary.MyModule('c',options);
但似乎没有定义“id”和选项。
有人可以帮忙吗?