haltu / muuri

Infinite responsive, sortable, filterable and draggable layouts
https://muuri.dev
MIT License
10.77k stars 643 forks source link

TypeError in wkhtmltopdf (QtWebKit), which doesn't have Function.prototype.bind #523

Closed sbj42 closed 1 year ago

sbj42 commented 2 years ago

If wkhtmltopdf is used to print a site that's using Muuri, a JavaScript TypeError occurs and Muuri does not work in the resulting PDF. This is because wkhtmltopdf uses version 4 of Qt WebKit, which is old and doesn't have Function.prototype.bind.

> wkhtmltopdf.exe --debug-javascript https://muuri.dev/ out.pdf
...
Warning: undefined:0 TypeError: 'undefined' is not a function

This can be worked around by adding a polyfill for Function.prototype.bind.

niklasramo commented 1 year ago

This issue is not relevant to Muuri's core as far as I can tell as Muuri is not "officially" supported in browsers that don't have Function.prototype.bind.