Wait until the document has loaded
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»
Previous TopicNext Topic