(event, data)
| 410 | this.functions[event].push(func); |
| 411 | } |
| 412 | callEvent(event, data) { |
| 413 | if (!this.functions) this.functions = {}; |
| 414 | if (!Array.isArray(this.functions[event])) return 0; |
| 415 | this.functions[event].forEach(e => e(data)); |
| 416 | return this.functions[event].length; |
| 417 | } |
| 418 | setElements(element) { |
| 419 | const game = this.createElement("div"); |
| 420 | const elem = document.querySelector(element); |
no test coverage detected