Skip to content

Releases: 1904labs/dom-to-image-more

v2.15.0

01 Feb 23:30
9cec8c8
Compare
Choose a tag to compare

Backport the fixes in #113

Full Changelog: v2.14.1...v2.15.0

Hotfix for leaking sandbox iframe

30 Jan 20:29
9602281
Compare
Choose a tag to compare
Pre-release

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

30 Jan 20:09
a8f6726
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.14.0...v2.14.1

v3.0.1-rc.0

16 Jan 04:00
Compare
Choose a tag to compare
v3.0.1-rc.0 Pre-release
Pre-release

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 a data: 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 Promises :) 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 emit x="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 to scrollWidth 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 prettiered 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

16 Jan 03:43
ab34596
Compare
Choose a tag to compare

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

10 Jan 03:39
8a80c31
Compare
Choose a tag to compare

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 a data: 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!

12 Jan 07:10
08a5329
Compare
Choose a tag to compare

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

  • @JoshuaWalsh made their first contribution in #82
  • @FredZeng made their first contribution in #84

Full Changelog: v2.12.0...v2.13.1

Enable Firefox testing and remove Bower

05 Jul 20:42
Compare
Choose a tag to compare

Bower support is not needed. #74
Revised to remove paths for Windows testing support and also allow Firefox to be used #73

CSS Optimizations and security fixes

12 May 10:45
Compare
Choose a tag to compare

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

New Contributors

Full Changelog: v2.9.5...v2.10.1

Really fix getComputedStyle when embedded in angular

06 Dec 23:30
Compare
Choose a tag to compare

Uses global.getComputedStyle or falls back to window.getComputedStyle is that's not real.

Full Changelog: v2.9.4...v2.9.5