(_type: string)
| 675 | this.height = h; |
| 676 | } |
| 677 | getContext(_type: string) { |
| 678 | return { |
| 679 | drawImage() {}, |
| 680 | getImageData() { |
| 681 | if (behavior === "tainted") { |
| 682 | throw new DOMException("Tainted canvases may not be exported.", "SecurityError"); |
| 683 | } |
| 684 | const alpha = behavior === "opaque" ? 255 : 0; |
| 685 | return { data: new Uint8ClampedArray([255, 0, 0, alpha]), width: 1, height: 1 }; |
| 686 | }, |
| 687 | }; |
| 688 | } |
| 689 | } as unknown as typeof OffscreenCanvas; |
| 690 | return () => { |
| 691 | if (orig === undefined) { |
no outgoing calls
no test coverage detected