Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

225
Visualizações
Inject Vue Component into web page using Quasar bex

I'm building a browser extension using quasar bex and I want to show a vue component in the loaded web page

I already tried to use content script hook to add raw html and css in the web page

But i want to add a component from my src/components folder which is also using quasar components like q-btn etc.

Is there any way to achieve this !

Thank you !

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Ok i've managed to solve it I'm writing the solution , so may be someone else can found it useful I used iframe to inject my component OR page into the loaded web page

First i created a new route, say test in routes.js like

{
  name: "test",
  path: "/test",
  component: () => import("pages/test.vue"),
},

Then i created an iframe and loaded that specific route in content-script.js like

function createIframe() {
  const iframe = document.createElement("iframe");
  iframe.width = "220px";
  iframe.height = "220px";

  Object.assign(iframe.style, {
    position: "fixed",
    border: "none",
    zIndex: "10000",
  });

  // load that specific page 
  iframe.src = chrome.runtime.getURL("www/index.html#test");

  return iframe;
}

You can set your iframe width and height and other things you may need Then you can use it as an element to inject anywhere like

document.body.prepend(createIframe());

Here we go ! :)

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda