I have a simple fabric js based application where I will let users add shapes connect them and animate them.
Following is my JS
var canvas; window.newA
Since new version of fabric.js was released - you should use:
canvas.remove(canvas.getActiveObject());