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

241
Visualizações
How to get a text/javascript file to communicate with a module?

I have a javascript module file that communicates with my database and I have a couple text/javascript files (screenshot below). In my text/javascript files I have users submitting highscores. So far I have been sending these to the browser local storage, retrieving them in the module file, and then exporting them to my database. For several reasons, this method does not seem sustainable as I further develop my app.

I did some research on how to get my files to "communicate" with each other but the only solution I can find is to re-define all my javascript files as modules, that way I can use the import function to share functions/variables. My question is, how do I get these files to communicate with each other? And is re-defining all js files to be modules feasible?

File Definitions

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