You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fillText is a method, strokeStyle is a getter/setter. You'll see the same TypeError for all getters/setters.
This is intentional since #808. Neither Chrome nor Firefox have this behavior (they return the descriptor), but I'm not sure we can do the same from a native module.
@zbjornson I would expect the getter/setter to be returned along a descriptor. Is it possible to change that somehow? Currently V8 is not able to handle this: nodejs/node#39866 (comment)
Object.getOwnPropertyDescriptor(CanvasRenderingContext2D.prototype, "strokeStyle");
"TypeError: Method strokeStyle called on incompatible receiver [object Object]
others no problem
eg: Object.getOwnPropertyDescriptor(CanvasRenderingContext2D.prototype, "fillText");
Environment
node-cavas:2.5.0
node:V10.16.0
windows7 64bit
The text was updated successfully, but these errors were encountered: