workaround for hasAttribute() calls found in custom-select #5506

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@erikyuzwa
Contributor

erikyuzwa commented Jan 21, 2013

hasAttribute only supported on IE8+ so using a getAttribute workaround.

erikyuzwa added some commits Jan 21, 2013

Update js/widgets/forms/select.custom.js
hasAttribute only supported on IE8+ so using a getAttribute workaround.
Update js/widgets/forms/select.custom.js
accidentally swapped true / false
@guestnav

This comment has been minimized.

Show comment
Hide comment
@guestnav

guestnav Jan 22, 2013

Erik Yuzwa notifications@github.com wrote:

hasAttribute only supported on IE8+ so using a getAttribute workaround.

You can merge this Pull Request by running

git pull https://github.com/erikyuzwa/jquery-mobile master

Or view, comment on, or merge it at:

  #5506

Commit Summary

Update js/widgets/forms/select.custom.js

File Changes

M js/widgets/forms/select.custom.js (14)

Patch Links:

https://github.com/jquery/jquery-mobile/pull/5506.patchhttps://github.com/jquery/jquery-mobile/pull/5506.diff

Erik Yuzwa notifications@github.com wrote:

hasAttribute only supported on IE8+ so using a getAttribute workaround.

You can merge this Pull Request by running

git pull https://github.com/erikyuzwa/jquery-mobile master

Or view, comment on, or merge it at:

  #5506

Commit Summary

Update js/widgets/forms/select.custom.js

File Changes

M js/widgets/forms/select.custom.js (14)

Patch Links:

https://github.com/jquery/jquery-mobile/pull/5506.patchhttps://github.com/jquery/jquery-mobile/pull/5506.diff

@gabrielschulhof

This comment has been minimized.

Show comment
Hide comment
@gabrielschulhof

gabrielschulhof Jan 23, 2013

Contributor

I shortened the code a little bit. I'm assuming that !e.hasAttribute( "x" ) is equivalent to e.getAttribute( "x" ) === null. I hope that assumption is valid.

Contributor

gabrielschulhof commented Jan 23, 2013

I shortened the code a little bit. I'm assuming that !e.hasAttribute( "x" ) is equivalent to e.getAttribute( "x" ) === null. I hope that assumption is valid.

@erikyuzwa

This comment has been minimized.

Show comment
Hide comment
@erikyuzwa

erikyuzwa Jan 23, 2013

Contributor

ooo that looks way prettier. Thanks for the lesson @gabrielschulhof

Contributor

erikyuzwa commented Jan 23, 2013

ooo that looks way prettier. Thanks for the lesson @gabrielschulhof

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