Side navigation
#12956 closed feature (fixed)
Opened November 26, 2012 12:15AM UTC
Closed December 12, 2012 03:07AM UTC
Improve cloneFixAttributes function
Reported by: | markel | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Events bounded via addEventListener will not be cloned in IE, events bounded via attachEvent will, but in IE9-10, jQuery does not use attachEvent method and even if it did, clear(merge)Attributes hack would not work for those events anyway.
So for new IE, there is no reason to use this hack.
Expando property is not cloned in IE9-10 and it might not exist at all, but removeAttribute method is expensive to use, it would be better to check for existence of expando before trying to remove it.
I would perform clear(merge)Attributes hack only if expando property is exist, but it would affect user events bounded via attachEvent, i'm wondering - is it a real issue?
pull request - https://github.com/jquery/jquery/pull/1034