add canvas detection