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

115
Visualizações
How to connect a javascript to a newly created window/document

I'm trying to make firebase-auth work in a chrome extension with manifest v3.

The biggest problem is that this code would need to run as a service worker, and as such can't access the main window for security reasons. Assuming that that will not change, I tried to modify the firebase libraries, such that on startup, I create a new Chrome window with chrome.windows.create() and then replace all calls to window in the firebase libraries with the newly created window. My current theory is that this should work (more or less, modulo service worker restarts etc). It required downloading the libraries and using webpack or rollup to create a single .js bundle.

HOWEVER: I'm currently stuck because even after chrome.windows.create(), I need to update the global javascript window and document variables (that for service workers are undefined by default). How do I go about this? The object returned from chrome.windows.create is not the same as the global javascript window, and I have no idea on how to get to document.

Sorry for the noob questions, and many thanks in advance for any help!

about 4 years ago · Juan Pablo Isaza
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