Module scripts should only execute once per page

Fixed Issue #11865922


Jake A.
May 2, 2017
This issue is public.
Found in
  • Microsoft Edge
Fixed in build #
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

// index.html
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, minimum-scale=1.0">
    var record = “";
    function addTextToBody(text) {
      const div = document.createElement(‘div’);
      div.textContent = text;
    registerDebugDump(function(text){ record += text+"<br>"; });
  <script type="module” src="1.js"></script>
  <script type="module" src="1.js"></script>
  <script type="module">
    import "./1.js";
    import "./1.js";
    import "./1.js";
  <script src="2.js"></script>
  <script src="2.js"></script>

// 1.js
addTextToBody(‘1.js executed.’);

// 2.js
addTextToBody(‘2.js executed.’);

1.js should only execute once, but Edge executes it 3 times.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

    • Hello,

      Thank you for providing this information about the issue. After thorough testing, we are unable to reproduce the problem in Edge and find your sample exhibits the same behavior in other browsers. Please update this case when you can provide a working repro and possibly run dxdiag (Windows key + r and type dxdiag, enter, then click Save all Information) and attach the txt file.

      Best Wishes,
      The MS Edge Team

    • This is an experimental feature, so you’ll need to enable experimental JS in Edge.

      If 1.js never executes, the feature isn’t correctly enabled.

      I’ve detailed how to enable this feature across the browsers at Once you do that, Edge is the only browser failing this test.

    • Microsoft Edge Team

      Changed Assigned To to “Ed M.”

      Changed Assigned To from “Ed M.” to “Suwei C.”

      Changed Status to “Confirmed”

      Changed Steps to Reproduce

      Changed Assigned To from “Suwei C.” to “Jeff W.”

      Changed Status from “Confirmed” to “In progress”

      Changed Status from “In progress” to “In code review”

      Changed Status from “In code review” to “Fixed”

    • This has been fixed, and will be available in a future Windows Insider flight.  Thanks for your report!

    You need to sign in to your Microsoft account to add a comment.

    Sign in