Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing to `currentSrc` #267

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

Writing to `currentSrc` #267

Wilto opened this issue Apr 22, 2015 · 5 comments
Labels

Comments

@Wilto
Copy link
Member

@Wilto 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
Copy link
Member

@aarongustafson aarongustafson commented Apr 22, 2015

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
Copy link
Member

@nwtn nwtn commented Apr 22, 2015

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

@tabatkins
Copy link

@tabatkins tabatkins commented Apr 22, 2015

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
Copy link

@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
Copy link
Member Author

@Wilto 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.