Good afternoon.
I try to do a chrome extension that need to access the main vue object on a Vue.js website. To do that, I type let vue=document.getElementById('app').__vue__
in chrome's console, and I can well read its values.
In my chrome extension I have a script that contains exactly the same code but vue is undefined. I tried to debug like that.
let app=document.getElementById('app')
let vue=app.__vue__
console.log(app, vue)
the result is 'app=<div...> vue=undefined'. When I right click on app -> store as global variable (its often called temp1), and I do temp1.__vue__
then the result is not undefined and contains the object I was looking for (as if I wrote let vue=document.getElementById('app').__vue__
).
Since my skills in web technologies are very bad, I would greatly appreciate a little help in figuring out what is going on and solving this problem. Thanks in advance !
Best