Galooshi / happo

Visual diffing in CI for user interfaces
504 stars 16 forks source link

Wait for images with crossorigin=anonymous #226

Closed trotzig closed 5 years ago

trotzig commented 5 years ago

I've had spurious diffs reported from images with a crossorigin attribute. This could be because the browser kicks off different requests for the crossorigin image and the preloaded image. This creates a race condition: if the crossorigin image isn't ready by the time the preload image is downloaded, it won't show up in the screenshot. We can fix this by transferring crossorigin information from the original image to the temporary Image created as part of preloading.