AnsweredAssumed Answered

Add a canvas to a widget dynamically?

Question asked by Grieck on Feb 28, 2017
Latest reply on Mar 2, 2017 by Grieck

Hello,

 

How can I add a canvas to a widget dynamically?

 

var canvas = document.createElement("canvas");
canvas.id = 'outer';
canvas.width = '300' ;
canvas.height = '200';
canvas.style.border = '2x solid';
if (!canvas.getContext) return;
var ctx = canvas.getContext('2d');

 

//add to widget????

Outcomes