1 | import { BaseImageResource } from './BaseImageResource.mjs';
|
2 |
|
3 | class CanvasResource extends BaseImageResource {
|
4 | constructor(source) {
|
5 | super(source);
|
6 | }
|
7 | static test(source) {
|
8 | const { OffscreenCanvas } = globalThis;
|
9 | if (OffscreenCanvas && source instanceof OffscreenCanvas) {
|
10 | return true;
|
11 | }
|
12 | return globalThis.HTMLCanvasElement && source instanceof HTMLCanvasElement;
|
13 | }
|
14 | }
|
15 |
|
16 | export { CanvasResource };
|
17 | //# sourceMappingURL=CanvasResource.mjs.map
|