Skip to content

Commit

Permalink
feat: ✨ add svg image with href support (#198)
Browse files Browse the repository at this point in the history
* feat: ✨ add svg image with href support

* feat: ✨ add svg image with href support

* feat: ✨ add svg image with href support

added tests
  • Loading branch information
isergey87 authored Oct 9, 2021
1 parent 5e4f1b4 commit cb6f916
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/embedImages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,25 @@ async function embedBackground<T extends HTMLElement>(
})
}

async function embedImageNode<T extends HTMLElement>(
async function embedImageNode<T extends HTMLElement | SVGImageElement>(
clonedNode: T,
options: Options,
): Promise<T> {
if (!(clonedNode instanceof HTMLImageElement) || isDataUrl(clonedNode.src)) {
if (
!(clonedNode instanceof HTMLImageElement && !isDataUrl(clonedNode.src)) &&
!(
clonedNode instanceof SVGImageElement &&
!isDataUrl(clonedNode.href.baseVal)
)
) {
return Promise.resolve(clonedNode)
}

const { src } = clonedNode
const src =
clonedNode instanceof HTMLImageElement
? clonedNode.src
: clonedNode.href.baseVal

return Promise.resolve(src)
.then((url) => getBlobFromURL(url, options))
.then((data) =>
Expand All @@ -44,8 +54,12 @@ async function embedImageNode<T extends HTMLElement>(
new Promise((resolve, reject) => {
clonedNode.onload = resolve
clonedNode.onerror = reject
clonedNode.srcset = ''
clonedNode.src = dataURL
if (clonedNode instanceof HTMLImageElement) {
clonedNode.srcset = ''
clonedNode.src = dataURL
} else {
clonedNode.href.baseVal = dataURL
}
}),
)
.then(
Expand Down
11 changes: 11 additions & 0 deletions test/spec/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,17 @@ describe('html to image', () => {
.then(done)
.catch(done)
})

it('should render svg `<image>` with href', (done) => {
Helper.bootstrap(
'svg-image/node.html',
'svg-image/style.css',
'svg-image/image',
)
.then(Helper.renderAndCheck)
.then(done)
.catch(done)
})
})

describe('work with options', () => {
Expand Down
1 change: 1 addition & 0 deletions test/spec/resources/svg-image/image
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4AAAADMCAYAAAAiRs3dAAAAAXNSR0IArs4c6QAAIABJREFUeF7t3Qn0VeP+x/GP+6dEk7qU4Ta4GetKpGQokjkqQ0jJlFmDJhFl1ihTFIqEiOIqRVxjIxIJkRRKug1UFKH/2vf4Lclvz/v89nP28z5rncVav+f5Ps/z+p67ls89++y91aattUm8EECgeIGN/M+DjwYCCCCAAAIIIIBAdgS2IgBmp5mcJA8CBMA8oFISAQQQQAABBBBAIC0BAmBa8qxbGAIEwMLoE7tEAAEEEEAAAQQQCCRAAAzExCBrBQiA1raegyOAAAIIIIAAAlkUIABmsaucKTkBAmByllRCAAEEEEAAAQQQSF2AAJh6C9iA0QIEQKPbw+YQQAABBBBAAAEEwgkQAMN5Mdo2AQKgbR3nvAgggAACCCCAQKYFCICZbi+Hiy1AAIxNSAEEEEAAAQQQQAABcwQIgOb0gp2YKEAANLEr7AkBBBBAAAEEEEAgogABMCIc0ywRIABa0miOiQACCCCAAAII2CFAALSjz5wyqgABMKoc8xBAAAEEEEAAAQQMFCAAGtgUtmSQAAHQoGawFQQQQAABBBBAAIG4AgTAuILMz7YAATDb/eV0CCCAAAIIIICAZQIEQMsaznFDChAAQ4IxHAEEEEAAAQQQQMBkAQKgyd1hb+kLEADT7wE7QAABBBBAAAEEEEhMgACYGCWFMilAAMxkWzkUAggggAACCCBgqwAB0NbOc+5gAgTAYE6MQgABBBBAAAEEECgIAQJgQbSJTaYmQABMjZ6FEUAAAQQQQAABBJIXIAAmb0rFLAkQALPUTc6CAAIIIIAAAghYL0AAtP4jAICnAAGQDwgCCCCAAAIIIIBAhgQIgBlqJkfJgwABMA+olEQAAQQQQAABBBBIS4AAmJY86xaGAAGwMPrELhFAAAEEEEAAAQQCCRAAAzExyFoBAqC1refgCCCAAAIIIIBAFgUIgFnsKmdKToAAmJwllRBAAAEEEEAAAQRSFyAApt4CNmC0AAH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EMi1AAMx0ezlcbAECYGxCCiCAAAIIIIAAAgiYI0AANKcX7MREAQKgiV1hTwgggAACCCCAAAIRBQiAEeGYZokAAdCSRnNMBBBAAAEEEEDADgECoB195pRRBQiAUeWYhwACCCCAAAIIIGCgAAHQwKawJYMECIAGNYOtIIAAAggggAACCMQVIADGFWR+tgUIgNnuL6dDAAEEEEAAAQQsEyAAWtZwjhtSgAAYEozhCCCAAAIIIIAAAiYLEABN7g57S1+AAJh+D9gBAggggAACCCCAQGICBMDEKCmUSQECYCbbyqEQQAABBBBAAAFbBbbatGnTJlsPz7kRQAABBBBAAAEEEEAAAZsECIA2dZuzIoAAAggggAACCCCAgNUCBECr28/hEUAAAQQQQAABBBBAwCYBAqBN3easCCCAAAIIIIAAAgggYLXA/wOOnIwVx+p48wAAAABJRU5ErkJggg==
8 changes: 8 additions & 0 deletions test/spec/resources/svg-image/node.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<svg
width="200"
height="200"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg"
>
<image height="200" width="200" href="/base/test/spec/resources/svg-image/svg-image.png" />
</svg>
3 changes: 3 additions & 0 deletions test/spec/resources/svg-image/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#dom-node {
background-color: white;
}
Binary file added test/spec/resources/svg-image/svg-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cb6f916

Please sign in to comment.