Detect html canvas with javascript