DOM is not ready in mounted hook?


Did I get an error for DOM in the mounted hook, how to fix it?
I found a dirty fix with the set timeout method, but that is not the solution.

setTimeout(() => {
    ...
// VanillaJS DOM is ready! 
// This is extrenal file 
  }, 1000);

mounted() {
... call imported function from above
}

Help me, how to solve this problem, I want to have DOM ready for vanilla JS DOM manipulation 🙂

Source: JavaSript – Stack Overflow

November 26, 2021
Category : News
Tags: DOM | javascript | Vue.js

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.