Anchor element's "origin" property is undefined only in Edge

Fixed Issue #12236493

Details

Author
Kyle S.
Created
Jun 5, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
38.14393
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

Constructed anchor (a) elements that have an assigned href result in the origin property being undefined. This is inconsistent with all other major browsers.

Example

See https://jsfiddle.net/37y8bhky/3/

var link = document.createElement('a');
link.href = "https://google.com";

console.log('origin is: ');
console.log(link.origin);

Edge Result

origin is:
undefined

Chrome Result (and all others)

origin is:
"https://google.com"

This is particularly an issue when using libraries that rely this functionality such as AngularJS. Issues have been opened with the library which result in hacky, insecure workarounds as outlined here:

Attachments

0 attachments

    Comments and activity

    • Changed Steps to Reproduce

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Assigned To to “Travis L.”

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

      Changed Status to “Confirmed”

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

      Changed Status from “Confirmed” to “Fixed”

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

    Sign in