Releases: 1904labs/dom-to-image-more
v2.15.0
Backport the fixes in #113
Full Changelog: v2.14.1...v2.15.0
Hotfix for leaking sandbox iframe
What's Changed
- Better default styles computation. by @IDisposable in #108
- Add support for Shadow DOM (ShadowRoot) by @meche-gh in #101
- Ensure the sandbox iframe is discarded. by @IDisposable in #112
Full Changelog: v3.0.1-rc.0...v3.0.2-rc.0
Hotfix for v2.x leaking an iframe
What's Changed
- Hotfix for v2.x to ensure cleanup of the Sandbox by @IDisposable in #111
Full Changelog: v2.14.0...v2.14.1
v3.0.1-rc.0
What's Changed
Breaking Change Notice
The 3.x release branch will include some breaking changes in the vary infrequently used ability to configure some utility methods used in this internal processing of dom-to-image-more. As browsers have matured, many of the hacks we're accumulated over the years are not needed, or better ways have been found to handle some edge-cases. With the help of folks like @meche-gh, in #99 we're stripping out the following members:
.mimes
- was the not-very-comprehensive list of mime types used to handle inlining things.parseExtension
- was a method to extract the extension from a filename, used to guess mime types.mimeType
- was a method to map file extensions to mime types.dataAsUrl
- was a method to reassemble adata:
URI from a Base64 representation and mime type
The 3.x release branch should also fix more node compatibility and iframe
issues.
Externally visible changes
- Cleaned up how root node is being handled and remove spurious
delay
3ed4ef5 - Skip the sandbox we inject to do default style detection when cloning to ensure we don't pollute the clone's DOM (with @meche-gh) 3ed4ef5
- Cleanup of child-node cloning to ensure we don't make too many
Promise
s :) b1e296d and - Switch from emitting a
.
in the sandbox element to emitting a zero-width-space'1\u200B'
so we get more accurate sizing 40d2314 - Never clone
SCRIPT
elements (they should never land in the SVG!) eeed471 - Create the element used to detect default styles in the sandbox, not in the main DOM, to isolate it from document-wide styling b51f0d0
- Correct the destruction logic of the sandbox, it was preemptively killing the timer used to clear the style cache, which would cause issues when doing lots of conversions quickly ada8f8c
- Simplified the SVG emitted to place the width and height on the
foreignObject
and not emitx="0" y="0"
because that irritates BIMI b844a49 - Attempts to handle non-
px
widths and heights of the target node, while honoring any explicitly-set size (and falling back toscrollWidth
based values like before eeed471 - Fix
getWindow(node)
fallback by @meche-gh in #97 - Ensure there's a mimetype in all inlined images by @meche-gh in #98
- Bypass Trusted Types policy requirement by @meche-gh in #100
- Work on table padding issue #95 by @IDisposable in #104
- Catch up to master's clone-cleanups by @IDisposable in #107
Internal changes
- Removed imagediff from testing use and added semver and NPM scripts for using them
- Cleaned up tests (especially the OCR-based ones) to ensure repeatability and general housekeeping on tests: 8a80c31
- Added some unit tests for issue #95 (solution still coming, but workaround is use
TH, TD { padding: 0.000001px; }
for now b51f0d0 - Cleaned up and
prettier
ed everything and added that to the release process. Lots of code-style cleanup in source, documentation, and tests 8a80c31 - The unit test jig now leverages the
onclone
event to insure the cloned node into the test page for easier deciphers of what styles were not inlined correctly. Follow this pattern in you jsfiddles too :) 6e44967
New Contributors
- @meche-gh made their first contribution in #97
Full Changelog: v2.14.0...v3.0.1-rc.0
v2.14.0 Fixes for mimetypes, node, and DOM security
What's Changed
- Fix
getWindow(node)
fallback by @meche-gh in #97 - Ensure there's a mimetype in all inlined images by @meche-gh in #98
- Bypass Trusted Types policy requirement by @meche-gh in #100
New Contributors
- @meche-gh made their first contribution in #97
Full Changelog: v2.13.1...v2.14.0
Cleanup to work with modern node/browsers
BREAKING CHANGE!
Version 3.x removes some internal methods that could have been overridden, but likely never were to better support modern browsers. Please make sure you were not directly using or overloading any of the following:
.mimes
- was the not-very-comprehensive list of mime types used to handle inlining things.parseExtension
- was a method to extract the extension from a filename, used to guess mime types.mimeType
- was a method to map file extensions to mime types.dataAsUrl
- internally used to reassemble adata:
URI from a Base64 representation and mime type
Also note that the SVG optimizations have been temporarily removed as there were a bunch of edge cases that didn't always work. This functionality will be reintroduced as a plug-in soon.
What's Changed
- Enable sourcemap generation by @JoshuaWalsh in #82
- fix: default httpTimeout by @FredZeng in #84
- Fix background images not being loaded by @JoshuaWalsh in #81
- Cleanup fixes by @IDisposable in #88
- Eliminate the entire raster/vector path by @IDisposable in #91
- Fix
getWindow(node)
fallback by @meche-gh in #97 - Ensure there's a mimetype in all inlined images by @meche-gh in #98
- Bypass Trusted Types policy requirement by @meche-gh in #100
New Contributors
- @JoshuaWalsh made their first contribution in #82
- @FredZeng made their first contribution in #84
- @meche-gh made their first contribution in #97
Full Changelog: v2.11.1...v3.0.0-rc1
v2.13.1 Community UNITE!
What's Changed
- Enable sourcemap generation by @JoshuaWalsh in #82
- Bump engine.io from 6.2.0 to 6.2.1 by @dependabot in #85
- fix: default httpTimeout by @FredZeng in #84
- Fix background images not being loaded by @JoshuaWalsh in #81
- Release 2.13.0 to pull in cleanup fixes by @IDisposable in #88
- Eliminate the entire raster/vector path by @IDisposable in #91
New Contributors
Full Changelog: v2.12.0...v2.13.1
Enable Firefox testing and remove Bower
CSS Optimizations and security fixes
Added optimizations to the copying of CSS to skip all the default styling per #71 by @joswhite
Also bumped versions of NPM packages for security issues.
What's Changed
- Bump log4js from 6.3.0 to 6.4.0 by @dependabot in #60
- Bump follow-redirects from 1.14.1 to 1.14.8 by @dependabot in #64
- Bump karma from 6.3.9 to 6.3.16 by @dependabot in #65
- Remove default styles by @joswhite in #71
- Bump async from 2.6.3 to 2.6.4 by @dependabot in #69
- Bump grunt from 1.4.1 to 1.5.2 by @dependabot in #68
- Bump minimist from 1.2.5 to 1.2.6 by @dependabot in #67
New Contributors
Full Changelog: v2.9.5...v2.10.1
Really fix getComputedStyle when embedded in angular
Uses global.getComputedStyle or falls back to window.getComputedStyle is that's not real.
Full Changelog: v2.9.4...v2.9.5