joseluisq / printd

Print HTML elements or pages in modern browsers.
MIT License
80 stars 5 forks source link

Cannot create Printd instance passing options object. #4

Closed cManfredi closed 5 years ago

cManfredi commented 5 years ago

Expected Behavior

Creating an instance of Printd passing an options object should function without errors.

Actual Behavior

Appending the iframe on the parent element results in an error "TypeError: parent.appendChild is not a function"; Passing manually window.document.body as the parent field of the options object doesn't solve the problem.

Steps to Reproduce the Problem

const options = { headElements } const p = new Printd(options)

Specifications

joseluisq commented 5 years ago

Try to use the latest v1.4.0+ - https://github.com/joseluisq/printd/releases