An HTMLImageElement has a currentSrc
property so we can get the current source of an img
element. Useful when defining multiple possible sources with srcset
.
There seems to be no equivalent for an HTMLPictureElement.
Is there another way we can find the current source of a picture
element with Javascript?