Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
Cannot attach JS code to HTML page after system update

I recently updated to latest macOS and one page of my flask app stopped working when running on localhost.

I am extending simple layout.html with another html page. At the end of this extend page I have following script:

<script type="text/javascript">
  var oReq = new XMLHttpRequest();
  oReq.addEventListener("load", (function(xhr) {
                var code = xhr.currentTarget.response;
                var codeBlock = document.getElementById("code");
                codeBlock.textContent = code;
                hljs.highlightBlock(codeBlock);
            }));
    oReq.open("GET", "{{ url_for('static', filename='extend.js') }}");       

  </script>

I get error:

Uncaught TypeError: codeBlock is null

Everything worked fine until I updated to Monterey. Any help in resolving this is appreciated.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda