JSFiddle - React, Tailwind, and code Playground

by Paul Draper

HTML

<script src="http://canvg.googlecode.com/svn/trunk/rgbcolor.js"></script>
<script src="http://canvg.googlecode.com/svn/trunk/StackBlur.js"></script>
<script src="http://canvg.googlecode.com/svn/trunk/canvg.js"></script>
<canvas id="test" width="500" height="500"></canvas>1

JavaScript

var ctx = document.getElementById('test').getContext('2d');
for(var key in ctx) {
    if(typeof ctx[key] == 'function') {
        (function(key) {
            var f = ctx[key];
            ctx[key] = function() {
              console.log.apply(console, [key].concat(arguments));
              return f.apply(this, arguments);
            };
        })(key);
    }
}
ctx.drawSvg('<svg><circle x="0" y="0" r="10" width="100" height="100" fill="red" /></svg>', 0 , 0 , 500, 500);
console.log('done');