(url: string)
| 81 | } |
| 82 | |
| 83 | private async fetchSVGContent(url: string): Promise<string> { |
| 84 | try { |
| 85 | const response = await fetch(url); |
| 86 | if (!response.ok) { |
| 87 | throw new Error(`Failed to fetch SVG content: ${response.statusText}`); |
| 88 | } |
| 89 | return await response.text(); |
| 90 | } catch (error) { |
| 91 | console.error("Error fetching SVG content:", error); |
| 92 | throw error; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | private async convertToFormat( |
| 97 | svgContent: string, |