Create a new canvas
Named create() rather than v1's new() -- new cannot be used as a
JavaScriptCore-exported method name (it collides with the JS new operator
keyword at the bridging layer), and this codebase's conventions additionally
forbid method names starting with new/alloc/copy (an ARC/ObjC hazard).
Parameters
rect: object
A {x, y, w, h} dictionary describing the canvas window's frame
Create a new canvas Named
create()rather than v1'snew()--newcannot be used as a JavaScriptCore-exported method name (it collides with the JSnewoperator keyword at the bridging layer), and this codebase's conventions additionally forbid method names starting withnew/alloc/copy(an ARC/ObjC hazard).