Files
med-notes/.pnpm-store/v10/files/f0/b890400ab7e4be390316b168caa6ff26c87f0a75a09ea91f64cf199db6bf94fe89fa3a65b2386495dbd2ce4b0be3cf77f88b998b8904fe0f7be3b22c5b89cc
2025-05-09 05:30:08 +02:00

44 lines
1.0 KiB
Plaintext

'use strict'
const bindings = require('../build/Release/canvas.node')
module.exports = bindings
Object.defineProperty(bindings.Canvas.prototype, Symbol.toStringTag, {
value: 'HTMLCanvasElement',
configurable: true
})
Object.defineProperty(bindings.Image.prototype, Symbol.toStringTag, {
value: 'HTMLImageElement',
configurable: true
})
bindings.ImageData.prototype.toString = function () {
return '[object ImageData]'
}
Object.defineProperty(bindings.ImageData.prototype, Symbol.toStringTag, {
value: 'ImageData',
configurable: true
})
bindings.CanvasGradient.prototype.toString = function () {
return '[object CanvasGradient]'
}
Object.defineProperty(bindings.CanvasGradient.prototype, Symbol.toStringTag, {
value: 'CanvasGradient',
configurable: true
})
Object.defineProperty(bindings.CanvasPattern.prototype, Symbol.toStringTag, {
value: 'CanvasPattern',
configurable: true
})
Object.defineProperty(bindings.CanvasRenderingContext2d.prototype, Symbol.toStringTag, {
value: 'CanvasRenderingContext2d',
configurable: true
})