Nesting HTML in canvas

It's probably like this. Now you need to generate pictures according to the uploaded pictures and some inputs. Originally, I planned to use ImageMagick, but later I felt that two different codes should be made at the front and back ends. Then ImageMagick is far less easy to use than canvas. So, we finally decided to use canvas to handle it, and then send the base64 encoding of the picture back to the back end through todataurl and save it. Here's the code.

<!DOCTYPE html>
    <img  id="pic"  style="display:none"/>
    <canvas id="canvas" style="border:2px solid black;" width="200" height="200"></canvas>
        var canvas = document.getElementById("canvas");
        var ctx = canvas.getContext("2d");

        //See [drawing_dom_objects_into_a_canvas] [1]
        function drawHtmlToCanvas() {
            var data = "<svg xmlns='' width='200' height='200'>" +
             "<foreignObject width='100%' height='100%'>" +
               "<div xmlns='' style='font-size:40px'>" +
                 "<em>I</em> like <span style='color:white; text-shadow:0 0 2px blue;'>cheese</span>" +
               "</div>" +
             "</foreignObject>" +
            var DOMURL = self.URL || self.webkitURL || self;
            var img = new Image();
            var svg = new Blob([data], {type: "image/svg+xml;charset=utf-8"});
            var url = DOMURL.createObjectURL(svg);
            img.onload = function() {
                ctx.drawImage(img, 0, 0);
                //Chrome version does not support, currently only Firefox is supported
            img.src = url;

        function drawCrossOriginImg2Canvas(callback) {
            var img = new Image();
            //There is a cross domain problem with todataurl. See [CORS enabled image] [2]. The image server here should support access control allow origin
            img.crossOrigin = "Anonymous";
            img.src = document.getElementById('pic').src;
            img.onload = function(){
                ctx.drawImage(img, 0, 0);
                callback && callback();
                //Both chrome and Firefox are OK



The question is why chrome does not support todataurl () for blobs