I'm very new to VueJS and recently I've started a project with VueJS for an extension in chrome. I want my app.vue element to be displayed in body element of any web pages, so i've tried a query selector to displayed it. This query selector is set in my popup.js which render my #App. When I run my extension, it doesn't work. Is anybody have an idea of how it works?
To display my extension I've tried to used what I found on this Forum: https://forum.vuejs.org/t/vue-in-chrome-extension-append-div-to-body/5821/2
import Vue from 'vue'
import App from './App'
import router from './router/index'
import { store } from '../store/index'
const element = document.querySelector('body').firstChild
const anchor = document.createElement('DIV')
anchor.insertBefore(element)
new Vue({
store: store,
el: anchor,
router,
render: h => h(App)
})