normalize port after updating protocol

Fixed Issue #12555073


Timothy G.
Jun 29, 2017
This issue is public.
Found in
  • Microsoft Edge
Standard affected
URL Standard

Fixed in build #
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

var url = new URL('');
url.protocol = 'https:';
  // Edge prints "443" ❌
  // Chrome, Safari, Firefox print "" ✅

Currently, the above piece of code prints the empty string on Chrome, Safari, and Firefox, yet in Edge “443” is printed. Indeed, Edge’s behavior is compliant with the WHATWG URL Standard as of right now, but WHATWG has decided to adopt Chrome, Safari, and Firefox’s behavior in whatwg/url#328 as it allows the URL interface to be idempotent. Appropriate tests for this spec change are added to Web Platform Tests in

Interestingly, our test suite reveals that Edge’s HTMLAnchorElement and HTMLAreaElement interfaces already conform to the correct behavior, just not URL:

var el = document.createElement('a');
el.href = '';
el.protocol = 'https:';
  // Edge, Chrome, Safari, Firefox all print "" ✅
  // Internet Explore 11 prints "443" ❌


0 attachments

    Comments and activity

    • Changed Steps to Reproduce

      Changed Steps to Reproduce

    • Microsoft Edge Team

      Changed Assigned To to “Steven K.”

      Changed Assigned To to “Travis L.”

      Changed Assigned To from “Travis L.” to “Kris K.”

      Changed Assigned To from “Kris K.” to “Nishant S.”

      Changed Status to “Confirmed”

      Changed Status from “Confirmed” to “Fixed”

      Changed Assigned To to “Nishant S.”

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

    Sign in