There's a performance gain in using the element property (s.src) over se...

...tAttribute

Check if `src` exists as property of the element type and it's actually a of type string. If so we can directly assign our src string. Otherwise we use `setAttribute`