adds canvas and non canvas support. issues with both, see issue #1