Wait until the document has loaded

Wait until the document has loaded

Topic Progress:

Wait until the document has loaded

Add the following script-Tag to the head of your A-Frame document:

<script>
   document.addEventListener("DOMContentLoaded", function(event) {
      // Commands
   });
</script>

MDN explains the DOMContentLoaded: Ā«The DOMContentLoaded event is fired when the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loadingĀ»

Comments are closed.