Socket
Socket
Sign inDemoInstall

html2canvas

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html2canvas - npm Package Compare versions

Comparing version 1.0.0-alpha.7 to 1.0.0-alpha.8

4

CHANGELOG.md
### Changelog ###
#### v1.0.0-alpha.8 - 2.1.2018 ####
* Use correct doctype in cloned Document (Fix #1298)
* Fix individual border rendering (Fix #1349)
#### v1.0.0-alpha.7 - 31.12.2017 ####

@@ -4,0 +8,0 @@ * Fix form input rendering (#1338)

@@ -520,3 +520,3 @@ 'use strict';

documentClone.open();
documentClone.write('<!DOCTYPE html><html></html>');
documentClone.write(serializeDoctype(document.doctype) + '<html></html>');
// Chrome scrolls the parent document for some reason after the write to the cloned window???

@@ -529,2 +529,28 @@ restoreOwnerScroll(referenceElement.ownerDocument, scrollX, scrollY);

});
};
var serializeDoctype = function serializeDoctype(doctype) {
var str = '';
if (doctype) {
str += '<!DOCTYPE ';
if (doctype.name) {
str += doctype.name;
}
if (doctype.internalSubset) {
str += doctype.internalSubset;
}
if (doctype.publicId) {
str += '"' + doctype.publicId + '"';
}
if (doctype.systemId) {
str += '"' + doctype.systemId + '"';
}
str += '>';
}
return str;
};

10

dist/npm/Renderer.js

@@ -91,3 +91,3 @@ 'use strict';

var renderableBorders = container.style.border.filter(function (border) {
var hasRenderableBorders = container.style.border.some(function (border) {
return border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent();

@@ -109,8 +109,10 @@ });

renderableBorders.forEach(function (border, side) {
_this2.renderBorder(border, side, container.curvedBounds);
container.style.border.forEach(function (border, side) {
if (border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent()) {
_this2.renderBorder(border, side, container.curvedBounds);
}
});
};
if (HAS_BACKGROUND || renderableBorders.length) {
if (HAS_BACKGROUND || hasRenderableBorders) {
var paths = container.parent ? container.parent.getClipPaths() : [];

@@ -117,0 +119,0 @@ if (paths.length) {

@@ -6,3 +6,3 @@ {

"main": "dist/npm/index.js",
"version": "1.0.0-alpha.7",
"version": "1.0.0-alpha.8",
"author": {

@@ -9,0 +9,0 @@ "name": "Niklas von Hertzen",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc