We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 90865d3 + 93a208c commit 034bf99Copy full SHA for 034bf99
packages/canvas-polyfill/index.ts
@@ -75,9 +75,17 @@ if (!((global as any).TextDecoder instanceof TextDecoder)) {
75
});
76
}
77
78
-if (!((global as any).TextEncoder instanceof TextEncoder)) {
79
- Object.defineProperty(global, 'TextEncoder', {
80
- value: TextEncoder,
+if (!((global as any).TextDecoder instanceof TextDecoder)) {
+ Object.defineProperty(global, 'TextDecoder', {
+ value: TextDecoder,
81
+ configurable: true,
82
+ writable: true,
83
+ });
84
+}
85
+
86
+if (!((global as any).ImageBitmap instanceof ImageBitmap)) {
87
+ Object.defineProperty(global, 'ImageBitmap', {
88
+ value: ImageBitmap,
89
configurable: true,
90
writable: true,
91
0 commit comments