Skip to content

Instantly share code, notes, and snippets.

@nonopolarity
Last active February 21, 2020 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nonopolarity/745d8cec1bccf3f2edaac40e945cdedd to your computer and use it in GitHub Desktop.
Save nonopolarity/745d8cec1bccf3f2edaac40e945cdedd to your computer and use it in GitHub Desktop.
if (document.querySelector("#my-tmp-audio") === null) {
let aDiv = document.createElement("div"); // can edit gist?
aDiv.innerHTML = "<audio controls autoplay id='my-tmp-audio' style='display: none'></audio>";
document.body.appendChild(aDiv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment