document.referrer causing SCRIPT5011 Error after manipulation

Not reproducible Issue #19925541


Dietmar M.
Dec 13, 2018
This issue is public.
Found in
  • Microsoft Edge
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

The below statement will render document.referrer inaccessible, with no recovery possible. This code is derived from actual code used by some ad measurement and verification vendor, which subsequently crashed a number of other scripts on the same page.

((tempIframe) => {
var origGetter = document.lookupGetter(“referrer”);
var tempGetter = tempIframe.contentDocument.lookupGetter(“referrer”);
document.defineGetter("referrer", tempGetter);
document.defineGetter("referrer", origGetter);


Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Veerabhadra r.”

  • Hi, Thanks for reporting your feedback. We tested it and we cannot confirm it as a Edge browser issue. Could you please provide more information such as any error logs, screenshots or related snippet code that will help us to investigate further and reproduce this issue. 

    Best Regards,
    The MS Edge Team

  • Hi Veerabhadra,

    thanks for looking into this issue. To reproduce the issue please take these steps:

    1. copy the sample command (also available here)
    ((tempIframe) => {
      var origGetter = document.__lookupGetter__("referrer");
      var tempGetter = tempIframe.contentDocument.__lookupGetter__("referrer");
      document.__defineGetter__("referrer", tempGetter);
      document.__defineGetter__("referrer", origGetter);
    1. paste it into the developer tools’ console in Edge and execute it
    2. try to access document.referrer, e.g. by typing that into the console: you will get the error as mentioned (Screenshot).

    Reproduced on many different machines. Please let me know if any further questions!


  • Provided the wrong screenshot in my previous comment. This one’s better:
    SCRIPT5011 Error when accessing document.referrer

  • Microsoft Edge Team

    Changed Assigned To from “Veerabhadra r.” to “Zachariah L.”

  • Hi Undefined!

    I was unable to replicate the error after following your reproduction steps. For now, I will resolve this case as "Not Reproducible". If you are still experiencing this issue then please feel free to reopen this case.


  • Microsoft Edge Team

    Changed Status to “Not reproducible”

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

Sign in