ImageData() constructor throws Error "Function expected"

Fixed, not yet flighted Issue #7150647

Details

Author
Lutz R.
Created
Apr 8, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Standard affected
Interference

Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

I’ve experienced a problem when I try construct an ImageData object via new in my little JavaScript demo.
Open the JavaScript console and try:
var imgData = new ImageData(256, 256);
// throws the Error: “Function expected”

The error message is not really helpful.
Workaround:
In the demo, I’ve commented out all new ImageData(…)'s and replaced them with canvasContext.getImageData, eg :
var imgCanv = document.createElement(“canvas”);
var imgCanv.width = imgCanv.height = 256;
var imgCtx = imgCanv.getContext(“2d”);
var imgData = imgCtx.getImageData(0,0,256,256);

Attachments

0 attachments

    Comments and activity

    • Updated workaround: I can use canvasContext.createImageData(width,height) instead of getImageData

    • Microsoft Edge Team

      Changed Assigned To to “Rick J.”

      Changed Assigned To from “Rick J.” to “Ibrahim O.”

      Changed Assigned To to “Rick J.”

      Changed Assigned To to “Christian F.”

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

      Changed Status to “Confirmed”

      Changed Status from “Confirmed” to “In code review”

      Changed Status from “In code review” to “In progress”

      Changed Status from “In progress” to “In code review”

      Changed Status from “In code review” to “In progress”

      Changed Status from “In progress” to “Fixed, not yet flighted”

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

    Sign in