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

304
Visualizações
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 Respostas
Responde à pergunta

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 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