Closed MutazAshhab closed 2 years ago
@Taz17 have you tested how this change interacts with the screenshot code? My first thought is if the javascript runs later is there now a possibility that the screenshot will get taken before the javascript has run?
I guess it's a question of testing and understanding at what point exactly the screenshot happens.
I am trying to test this out... Google chrome updated to version 100.xx and now the gem is not working. Im trying to fix this issue now.
I am trying to test this out... Google chrome updated to version 100.xx and now the gem is not working. Im trying to fix this issue now.
I don't think you need to downgrade google chrome. You can upgrade the chrome driver instead. That should be simpler.
@mlandauer The screenshots come out just fine as they should. The JavaScript is being executed before the screenshot is taken.
The difference between the DOMContentLoaded
and load
event listeners is that DOMContentLoaded
does not wait for images or stylesheets. So the javascript executes before everything is positioned and font size is set hence causing the card to render the way it did as the screenshot I posted in the issue.
Using the load
event listener means the text will shrink once styling and images are rendered. Hence avoiding that render I posted
Fixes issue #1388
Changes all event listeners to fire off on
load
rather than onDOMContentLoaded