add canvas library

add dummy canvas library for JS generation.