Open daniel-hauser opened 5 years ago
@niklasvh
A possible fix is to use getComputedStyle(iframe).width
here instead of iframe.width
(and same for height)
Would you want me to open a PR?
PR #1863 has been merged in master recently so next release will hopefully solve your issue.
The code added in #1863 will result in not adding the iframe to the canvas. This is not good - as iframe width and height have default values (300 x 150px)
Sorry, I didn't check everything. You can definitely open a PR, that's what I did for the issue I had opened (#1865) and my PR has been merged.
Bug reports:
Trying to export an element with iframe with no width/height fails.
v1.0.0-rc.0: works as expected see here. v1.0.0-rc.3: will fail with
Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
see here.Specifications: