Open Alex1990 opened 6 years ago
Hi @Alex1990, the load event should be triggered automatically when the node is attached to a document, i.e.: https://github.com/eKoopmans/html2pdf/blob/50b768230199d7186919d40c8df402640c963f65/src/index.js#L124-L126
Is there an issue with it not firing?
Yes. It's not triggered. I must trigger it manually.
Okay, sounds like a problem. Can you provide an example? A Fiddle would be useful (see docs). Thanks!
I just wonder where it states the load
event will be triggered after appending the node to the document.
Fair enough, this example looks like it's not firing the load event. I had borrowed cloneNode
from html2canvas. I will investigate more tomorrow. Thanks!
The below code bound the
load
event.https://github.com/eKoopmans/html2pdf/blob/dbce51e917e32859cfb3890f0e4ec4e4e6d15eb7/src/utils.js#L52-L55