not resolved relative to script "src" as per v3 spec

Confirmed Issue #10288018 • Assigned to Zoher G.


Darrell T.
Dec 21, 2016
This issue is public.
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Steps to reproduce the problem:

  1. Create a local directory structure like so:


  1. Edit the html file to include the javascript file like so:

<script type="text/javascript" src="/foo/bar.js"></script>

  1. Open the js file, and ensure it has a sourceMappingUrl directive, pointing to the map file, but also ensure the url has a leading / like so:

//# sourceMappingURL=/

  1. Serve the directory up (browse the index.html page)

What is the expected behavior?
According to the Sourcemap V3 spec:

When the source mapping URL is not absolute, then it is relative to the generated code’s “source origin”.

If the generated code is associated with a script element and the script element has a “src” attribute, the “src” attribute of the script element will be the source origin.

This means I would expect edge to issue a request for the map file on /foo/

What went wrong?
Using fiddler (requests for source map files don’t appear to show up on the network tab) edge makes a request:

GET / HTTP/1.1

The leading “/” in the sourceMappingUrl appears to make edge treat resolve the url to the map file as relative to the site root rather than the source origin…


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Ibrahim O.”

      Changed Assigned To from “Ibrahim O.” to “Jacob R.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Jacob R.” to “Newton J.”

      Changed Assigned To from “Newton J.” to “Jeff F.”

      Changed Status from “Confirmed”

      Changed Assigned To to “edgedevtoolstri”

      Changed Assigned To from “edgedevtoolstri” to “Zoher G.”

      Changed Status to “Confirmed”

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

    Sign in