Answer the question
In order to leave comments, you need to log in
How to execute an external script when updating a model?
Hello!
I just can’t cope with the task of executing scripts that came in the server’s response in data.
For example, the $.load() method in jQuery successfully performs a similar task.
Here is my simplest example: https://codepen.io/KorniloFF/pen/NJGpxj?editors=1011
Answer the question
In order to leave comments, you need to log in
I quickly threw in the code, you can make it more beautiful, but I think I gave the idea
https://codepen.io/anon/pen/QojvoL?editors=1011
Alexander Kovalchuk , I post my crutch on the subject: https://codepen.io/KorniloFF/pen/ZPbyBe
The question continues to be of interest: is it possible to somehow dynamically load your documentFragment into the virtual DOM Vue? Possibly using a render function.
Maybe someone will come in handy, because in general it works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question