Answers for "how to element wait in javascript"

5

how to wait in javascript

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}
Posted by: Guest on September-29-2020
0

javascript wait for dom

document.addEventListener("DOMContentLoaded", function(event) { 
  //do work
});
Posted by: Guest on July-03-2021

Code answers related to "how to element wait in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language