V
V
valera734685342020-05-15 19:51:53
JavaScript
valera73468534, 2020-05-15 19:51:53

Why is the load js event not firing?

<html lang="en">
<head>
  <script>
    console.log('я дурак ?')
    document.addEventListener('load', () => {
      console.log('нет!')
    })
    document.addEventListener("DOMContentLoaded", () => {
      console.log('да или ')
    })
  </script>
  <meta charset="UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>Document</title>
</head>
<body>
  <div>
    test
  </div>
  
</body>
</html>

load event never fires

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question