Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

printd

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

printd - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

5

dist/index.js

@@ -30,6 +30,3 @@ function createStyle(doc, cssText) {

Printd.prototype.print = function (el, cssText, callback) {
if (this.el !== el) {
this.el = el;
this.node = el.cloneNode(true);
}
this.node = el.cloneNode(true);
var _a = this.iframe, contentDocument = _a.contentDocument, contentWindow = _a.contentWindow;

@@ -36,0 +33,0 @@ if (cssText) {

@@ -36,6 +36,3 @@ (function (global, factory) {

Printd.prototype.print = function (el, cssText, callback) {
if (this.el !== el) {
this.el = el;
this.node = el.cloneNode(true);
}
this.node = el.cloneNode(true);
var _a = this.iframe, contentDocument = _a.contentDocument, contentWindow = _a.contentWindow;

@@ -42,0 +39,0 @@ if (cssText) {

2

dist/printd.umd.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.printd={})}(this,function(t){"use strict";function e(t,e){var n=t.createElement("style");return n.type="text/css",n.appendChild(window.document.createTextNode(e)),n}function n(t){void 0===t&&(t=window.document.body);var e=window.document.createElement("iframe");return e.setAttribute("src","about:blank"),e.setAttribute("style","visibility:hidden;width:0;height:0;position:absolute;z-index:-9999;bottom:0;"),e.setAttribute("width","0"),e.setAttribute("height","0"),e.setAttribute("wmode","opaque"),t.appendChild(e),e}var i=function(){function t(t){void 0===t&&(t=window.document.body),this.node=null,this.parent=t,this.iframe=n(this.parent)}return t.prototype.getIFrame=function(){return this.iframe},t.prototype.print=function(t,n,i){this.el!==t&&(this.el=t,this.node=t.cloneNode(!0));var o=this.iframe,d=o.contentDocument,r=o.contentWindow;n&&d.head.appendChild(e(d,n)),this.node&&(d.body.innerHTML="",d.body.appendChild(this.node),i?i(r,d,this.node):r.print())},t}();t.Printd=i,t.createIFrame=n,t.createStyle=e,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.printd={})}(this,function(t){"use strict";function e(t,e){var n=t.createElement("style");return n.type="text/css",n.appendChild(window.document.createTextNode(e)),n}function n(t){void 0===t&&(t=window.document.body);var e=window.document.createElement("iframe");return e.setAttribute("src","about:blank"),e.setAttribute("style","visibility:hidden;width:0;height:0;position:absolute;z-index:-9999;bottom:0;"),e.setAttribute("width","0"),e.setAttribute("height","0"),e.setAttribute("wmode","opaque"),t.appendChild(e),e}var i=function(){function t(t){void 0===t&&(t=window.document.body),this.node=null,this.parent=t,this.iframe=n(this.parent)}return t.prototype.getIFrame=function(){return this.iframe},t.prototype.print=function(t,n,i){this.node=t.cloneNode(!0);var o=this.iframe,d=o.contentDocument,r=o.contentWindow;n&&d.head.appendChild(e(d,n)),this.node&&(d.body.innerHTML="",d.body.appendChild(this.node),i?i(r,d,this.node):r.print())},t}();t.Printd=i,t.createIFrame=n,t.createStyle=e,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "printd",
"version": "0.0.9",
"version": "0.0.10",
"description": "Print HTML elements in modern browsers.",

@@ -5,0 +5,0 @@ "repository": "joseluisq/printd",

@@ -132,8 +132,13 @@ # Printd [![npm](https://img.shields.io/npm/v/printd.svg)](https://www.npmjs.com/package/printd) [![npm](https://img.shields.io/npm/dt/printd.svg)](https://www.npmjs.com/package/printd) [![Build Status](https://travis-ci.org/joseluisq/printd.svg?branch=master)](https://travis-ci.org/joseluisq/printd) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

- Chrome 63+
- Chrome Desktop 63+
- Chrome for Android 64+
- Firefox 6+
- Edge
- Internet Explorer
- Opera Desktop 50+
- Opera for Android 50+
Reference: https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeprint
References:
- https://www.chromestatus.com/features/5700595042222080
- https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeprint

@@ -140,0 +145,0 @@ __Webkit-based and old browsers__

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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