app.js 290 B

12345678910
  1. window.createAppButton = function () {
  2. var button = document.createElement('button');
  3. button.innerText = 'Hello world';
  4. var clickCount = 0;
  5. button.onclick = () => {
  6. clickCount++;
  7. button.innerText = 'Click count ' + clickCount;
  8. };
  9. return button;
  10. }