Open chenyiqiao opened 4 years ago
https://github.com/niklasvh/html2canvas/issues/1284#issuecomment-652844658 I think this hack from @K-D-K is the best workaround right now, but is it possible to specify elements that are needed to clone, rather than find out elments to ignore? This might make things much easier.
@chenyiqiao actually we specifying the elements which needed to clone. we ignoring elements which don't have white_list_class.
html2canvas version tested with: 1.0.0-rc.5
I found that calling html2canvas function would cause html page resource get requested again. The situation is I'm using html2canvas to convert html page that could be very long, so I have to consider about the canvas size limit. The solution for me is to break the page into multiple parts and convert each part into canvas:
The result is html2canvas repetitively send page resource request:
Each request of my html page is requested as many times as html2canvas get called. After checking chrome initiator, it guides me to the
DocumentCloner.toIFrame
function of this line:I think this line of code end up with attaching the cloned html page into iframe, thus sending resource request again. I'm not sure how to fix this yet, but i think send every request again is inappropriate.