nl_tokens: We need to wrap the methods that receive an image or canvas object ( luckily always as the first argument ) so that these objects can be unwrapped an the expected types passed .
pl_tokens: function wrapNodeCanvasMethod ( ctx , <mask> ) { const prev = ctx [ name ] ; ctx [ name ] = function ( image ) { const impl = idlUtils . implForWrapper ( image ) ; if ( impl ) { arguments [ 0 ] = impl . _image || impl . _canvas ; } return prev . apply ( ctx , arguments ) ; } ; }