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 'и параметры, похоже, не определены.
может кто-нибудь помочь?