D
D
Denis Bukreev2016-09-01 20:20:31
JavaScript
Denis Bukreev, 2016-09-01 20:20:31

How to write a script using the VueJS framework?

So it goes.
There is Vue which loads "push" elements into the page AFTER it's loaded.
As a result, if I try to process elements inside some window.onload = () => {}, then when the page loads, these elements simply do not exist yet.
How to be?
I don't have much experience with such frameworks.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergei Nazarenko, 2016-09-01
@nazares

Try it via DOMContentLoaded
example:

function ready() {
       document.addEventListener("DOMContentLoaded", ready);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question