DOMContentLoaded will be fired twice on my page

In my page at, I write a very simple script theme1.js at, as below:

document.addEventListener('DOMContentLoaded', function () {
    var b = 1;

But during the debug, I find DOMContentLoaded event will be fired twice when pressing Ctrl + F5 to load the page.

I try to search online, and find two results:

  1. DOMContentLoaded event firing twice for a single page load, which said AVG add-on causes the issue, but I do not have AVG add-on installed.
  2., which provides a solution at, but the link is broken.

Has anyone encountered a similar issue?

Thank you


Because your page has an iframe

<iframe width="100%" height="800px" src=""></iframe>

It also includes the same theme1.js file