Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

248
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!