Skip to content

support of dataurl images #267

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

Merged
merged 2 commits into from
May 25, 2014
Merged

support of dataurl images #267

merged 2 commits into from
May 25, 2014

Conversation

woolfg
Copy link
Contributor

@woolfg woolfg commented May 25, 2014

support of elements with dataurl src

@@ -174,6 +174,9 @@

if(element.nodeName === 'CANVAS') {
var canvas = element;
//if already a supported data url image, just return the dataurl
} else if (element.getAttribute('src').indexOf('data:image/') === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be good checking element.nodeName === 'IMG' before getAttribute()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, getAttribute can return null, so using indexOf on it will throw.

@diegocr
Copy link
Contributor

diegocr commented May 25, 2014

Thanks, i'm merging without testing (since i don't think it's needed)

diegocr added a commit that referenced this pull request May 25, 2014
support of dataurl images
@diegocr diegocr merged commit c8ea94b into parallax:master May 25, 2014
diegocr added a commit that referenced this pull request May 25, 2014
@diegocr
Copy link
Contributor

diegocr commented May 25, 2014

I just did a few minor changes on fac3703

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants