Value of HTMLAnchorElement.host differs between script-created link and link from document

Not reproducible Issue #107251

Details

Created
Apr 27, 2014
Privacy
This issue is public.
Found in build #
0.0011
Reports
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce

URL = http://jsfiddle.net/jaXFe/
 
Repro Steps:
==============

  1. Open Internet Explorer.
  1. Either open the web page http://jsfiddle.net/jaXFe/ , or save the following code to a .html-file and open it:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript">
function query()
{
var anchor = document.getElementById(‘testlink’);
document.getElementById(‘span1’).innerHTML = anchor.host;

anchor2 = document.createElement(‘a’);
anchor2.setAttribute('href’, anchor.href);
document.getElementById(‘span2’).innerHTML = anchor2.host;
};
</script>
<title></title>
</head>
<body>
<a href="http://www.microsoft.com/" id="testlink">test</a>
<form><input type="button" onclick="query()" value="query"></form>
<p><span id="span1"></span></p>
<p><span id="span2"></span></p>
</body>
</html>

  1. Click on the query button.

span1 will contain www.microsoft.com
span2 will contain www.microsoft.com:80

They should be the same, since they’re both the value for the host property.

Expected Results:

Return hostname:port in both cases.

Actual Results:

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “IPBS P.”

      Changed Assigned To from “IPBS P.” to “Bruce M.”

      Changed Assigned To to “Kamen M.”

      Changed Assigned To from “Kamen M.” to “Nikhil K.”

      Changed Assigned To from “Nikhil K.” to “ChakraTriage”

      Changed Assigned To from “ChakraTriage” to “Rob P.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Rob P.” to “Travis L.”

      Changed Steps to Reproduce

      Changed Assigned To from “Travis L.” to “Sergey D.”

      Changed Assigned To from “Sergey D.” to “IPBS P.”

      Changed Status from “Confirmed” to “Not reproducible”

      Changed Assigned To from “IPBS P.” to “Eugene V.”

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

    Sign in