The HTMLSourceElement interface provides special properties (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating <source> elements.
A number that reflects the height HTML attribute, indicating the height of the image resource in CSS pixels. The property has a meaning only if the parent of the current <source> element is a <picture> element.
A string reflecting the src HTML attribute, containing the URL for the media resource. The HTMLSourceElement.src property has a meaning only when the associated <source> element is nested in a media element that is a <video> or an <audio> element. It has no meaning and is ignored when it is nested in a <picture> element.
Note:
If the src property is updated (along with any siblings), the parent HTMLMediaElement's load method should be called when done, since <source> elements are not re-scanned automatically.
A string reflecting the srcset HTML attribute, containing a list of candidate images, separated by a comma (',', U+002C COMMA). A candidate image is a URL followed by a 'w' with the width of the images, or an 'x' followed by the pixel density.
A number that reflects the width HTML attribute, indicating the width of the image resource in CSS pixels. The property has a meaning only if the parent of the current <source> element is a <picture> element.