joseluisq/printd

Broken in IE11

jcmillett opened this issue · 5 comments

Expected Behavior

Printing should work in IE11

Actual Behavior

Printing does not work in IE11. When attempting to print, a message is displayed in the console stating: "TypeError: Object doesn't support property or method 'assign'". It looks like this is caused by printd using Object.assign which isn't supported in IE11, so it needs a polyfill.

Steps to Reproduce the Problem

  1. In IE11 attempt to print using code like the following:
const printd = new Printd();
d.print( document.getElementById('myelement'), [ cssText ] );

Workaround

Manually polyfill Object.assign, but I think the distributable code for printd should already be including the polyfill.

Specifications

  • Version: v1.4.1
  • Node version: v12.16.2
  • Browser version: IE11 - v11.1425.17134.0

Object.assign is not supported. But here is the library + IE11 polyfill https://joseluisq.net/assets/printd/printd.umd.min.js.
Due I have no IE11 environment to test it, It would be great if you can do it by yourself.
Let me know about the results after your testing.

Thanks for responding. I just tested with that file and it looks like it works!

Great! A PR with the that fix will happen soon.

Done on release v1.4.2

@joseluisq Thanks for the quick reply and fix!