2

I currently have the markup below using Aura.

<div style="{! 'background-image: url(' + v.Logo + ')'}">
</div>

Assuming that v.Logo returns a broken url for the image, what's a good way to check if it the image is broken?

In JavaScript I can use the Image constructor to check this, but it seems like this constructor isn't available with LockerService turned on.

Any ideas?

1

Image is now exposed with LockerService enabled. Let us know if you have any issues using the API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.