Unexpected call to method or property access while drawing svg image onto canvas in IE 11

Not reproducible Issue #1019686

Details

Created
Oct 31, 2014
Privacy
This issue is public.
Reports
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce

URL:

Repro Steps:

I’m using the following code:

var img = new Image();
img.addEventListener('load’, function (oEvent) { //$NON-NLS-1$
var oImage = oEvent.srcElement;

    // if the image width and height was not pre-calculated then manually set it
    if (oImage.width <= 0 || oImage.height <= 0) {
        oImage.width = 48;
        oImage.height = 48;
    }

    var $container = this.$();
    var canvas = $container.find('canvas').get(0); //$NON-NLS-1$

    var ctx = canvas.getContext('2d'); //$NON-NLS-1$
    ctx.drawImage(oImage, 0, 0, oImage.width, oImage.height);

    }
}.bind(this));

img.style.display = "none"; //$NON-NLS-1$

setTimeout(function () {
    //this.crossOrigin = "Anonymous";  //$NON-NLS-1$
    this.src = sOriginalSrc;
}.bind(img), 0);

Expected Results:

First I would expect I wouldn’t need to do the workaround to get the width and height. Aside from that I would expect the drawImage should just work with SVG images.

Actual Results:

Dev Channel specific:

No

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Tony S.”

      Changed Assigned To to “Christian F.”

      Changed Assigned To from “Christian F.” to “IE F.”

      Changed Status to “Not reproducible”

      Changed Assigned To from “IE F.” to “Matt R.”

      Changed Status from “Not reproducible”

      Changed Assigned To from “Matt R.” to “Jonathan S.”

      Changed Assigned To from “Jonathan S.” to “Matt R.”

      Changed Assigned To from “Matt R.” to “Frank O.”

      Changed Status to “Not reproducible”

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

    Sign in