Can not access the context of Canvas on a child window

Issue #6405703 • Assigned to Li-Hsin H.

Details

Created
Feb 2, 2016
Privacy
This issue is public.
Reports
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce

URL:

Repro Steps:

      var win = window.open();
      var doc=win.document.open("text/html","replace");
      var txt="<html><body><canvas width=800 height=600 id=mycanvas></body></html>";
      doc.write(txt);
      doc.close();
      var c = doc.getElementById("mycanvas");
      var ctx = c.getContext("2d");
      var img = ctx.createImageData(1, 1);
      img.data[0] = 0xFF;
      img.data[1] = 0xFF;
      alert(img.data[0]);
      alert(img.data.length);

Expected Results:

You should be able to access them if it’s same origin. This happens on IE and Edge

Actual Results:

Dev Channel specific:

No

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To to “Christian F.”

      Changed Assigned To from “Christian F.” to “Li-Hsin H.”

      Changed Assigned To from “Li-Hsin H.” to “Steven K.”

      Changed Assigned To from “Steven K.” to “Li-Hsin H.”

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

    Sign in