Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | // use the the keyword "export", to export a "const" object called StartPageUI export const StartPageUI = { renderStartButton(start, resolve) { const loading = start.querySelector('.start-page-container .loading'); loading.innerHTML = ''; const button = document.createElement('input'); button.type = 'button'; button.value = 'Start Game'; button.addEventListener('click', () => { start.style.display = 'none'; // eslint-disable-line no-param-reassign resolve(); }); loading.appendChild(button); }, }; |