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

115
Vistas
What can cause the browser 'load' event to not fire?

I have a bug where the javascript 'load' event is not firing. This only happens when I navigate to code that goes through php however when I navigate to an html file it works fine.

'load' Event in the browser DOES trigger

test.html

<!DOCTYPE html>
<html lang="en-US">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <script>
            // Show all events that have fired
            Object.keys(window).forEach(key => {
                if (/^on/.test(key)) {
                    window.addEventListener(key.slice(2), event => {
                        console.log(event);
                    });
                }
            });
        </script>
    </head>
    <body>
    </body>
</html>

'load' Event in the browser NEVER fires

app.blade.php

<!DOCTYPE html>
<html lang="en-US">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <title>{{ config('app.name', 'Laravel') }}</title>

        {{-- Fonts --}}
        <link rel="stylesheet" href="https://rsms.me/inter/inter.css">

        {{-- Styles --}}
        <link href="{{ mix('/css/app.css') }}" rel="stylesheet" />

        {{-- Scripts --}}
        @routes
        <script src="{{ mix('/js/app.js') }}" defer></script>
        <script>
            // Show all events that have fired
            Object.keys(window).forEach(key => {
                if (/^on/.test(key)) {
                    window.addEventListener(key.slice(2), event => {
                        console.log(event);
                    });
                }
            });

        </script>
    </head>
    <body>
        @inertia
    </body>

</html>

I use laravel sail in WSL2.

Things I've tried:

  • turning it off and on again
  • testing in edge, still occurs
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This ended out being a conflict with an IPV6 address.

I listed the processes running on IPv4 and IPv6 and spotted both of these protocols were attempting to use localhost on port 80.

I ran the kill command on the IPv6 process and the browser started behaving correctly.

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