Writing to `currentSrc` #267

Closed
Wilto opened this Issue Apr 22, 2015 · 5 comments

Projects

None yet

5 participants

@Wilto
Member
Wilto commented Apr 22, 2015

An issue with Picturefill’s support tests (prior to 2.3.1) meant that some browsers with native support for currentSrc but no support for picture would throw an exception when Picturefill attempted to write to it. This has been addressed in Picturefill, but it’s likely to be a problem for anyone using a version prior to 2.3.1 as new browsers ship without the full respimg suite but with currentSrc.

Now, trying to work around this has me thinking: can anyone envision a case where currentSrc should be writable?

@aarongustafson
Member

It seems like a naturally read-only property to me.

On Wed, Apr 22, 2015 at 10:25 AM, Mat Marquis notifications@github.com
wrote:

An issue with Picturefill’s support tests (prior to 2.3.1) meant that some
browsers with native support for currentSrc but no support for picture
would throw an exception when Picturefill attempted to write to it. This
has been addressed in Picturefill, but it’s likely to be a problem for
anyone using a version prior to 2.3.1 as new browsers ship without the full
respimg suite but with currentSrc.

Now, trying to work around this has me thinking: can anyone envision a
case where currentSrc should be writable?


Reply to this email directly or view it on GitHub
#267.

@nwtn
Member
nwtn commented Apr 22, 2015

Doesn't writing to src already overrule all the source/srcset stuff? How would writing to currentSrc differ?

@tabatkins

No, there's no reason whatsoever to make it writeable. It's a convenience property for reflecting the result of a computation in the engine, not an actual attribute of anything.

@zcorpan
zcorpan commented Apr 23, 2015

Doesn't writing to src already overrule all the source/srcset stuff?

No, it just sets the src attribute. That invokes the "update the image data" algorithm, but that will select the appropriate candidate normally, not ignore everything but src.

@zcorpan zcorpan added the question label Apr 23, 2015
@zcorpan zcorpan closed this Apr 23, 2015
@Wilto
Member
Wilto commented Apr 23, 2015

Yeah, I got nothin’ on this either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment