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

311
Views
how can I find out what javascript objects are in use on a page? (digging through a webpack bundle)

I would like to manipulate a javascript object that is created by another script on the page. This script is a fairly large webpack bundle, and all the variable names that get used in this bundle do not seem to actually be in use on the web page – as far as I can see by running console.log(varname) on them, which always returns undefined.

I tried going through the options offered when starting to feed console.log with a name, but nothing came up that looked too promising (I tried some options but found nothing helpful).

Some background information on what I am trying to do: I am working with Grav, a flat file CMS, which in its Admin plugin uses a CodeMirror editor, among many other scripts. All the scripts are webpack bundled into admin.js and vendor.js (CodeMirror seems to be contained in the latter). I would like to use a CodeMirror addon and some different CodeMirror options, all of which is easy to do with standalone CodeMirror code – but I can't figure out how to get to the CodeMirror object in Grav Admin.

Your ideas are much appreciated! Thank you for your time.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Generally speaking, anything using webpack is likely to be only using variables scoped to the modules inside it. Modules are designed to they don't shove variables into the global scope (where they might clash with variables from other scripts).

It you want to change the way the script works, get the source code for it, edit it, then compile it with webpack again.

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