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

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

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