Skip to content

Instantly share code, notes, and snippets.

@why-jay
Last active August 29, 2015 14:11
Show Gist options
  • Select an option

  • Save why-jay/f174a4e0d3714063c8a0 to your computer and use it in GitHub Desktop.

Select an option

Save why-jay/f174a4e0d3714063c8a0 to your computer and use it in GitHub Desktop.
let panel = document.createElement('div');
let button = document.createElement('button');
button.addEventListener('click', function actionPerformed(e) {
// do stuff here
});
panel.appendChild(button);
@thomasschiet
Copy link
Copy Markdown

div.appendChild(button);

I guess this is a typo, it should be:

panel.appendChild(button);

@why-jay
Copy link
Copy Markdown
Author

why-jay commented Dec 31, 2014

Thank you! Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment