Some fixes were needed to get jQuery 1.5.1 working with EnvJs in Ruby Racer:
i) The jQuery.clone method uses an expando attribute that is removed in jQeury.cloneFixAttributes. But that attribute may not be present on the current node. If doc.implementation.errorChecking === false it should fail silently, see NamedNodeMap#removeNamedItem(NS).
ii) jQuery directly retrieves and sets the value attribute on the nodes, but (at least in Ruby Racer) the NamedNodeMap does not accept a call to value=. To fix this, explicit getter and setters are added, see NamedNodeMap#get/set value
iii) jQeury.cloneFixAttributes makes use of Element.clearAttributes and Element.mergeAttributes. Both methods were not defined yet.
The code changes I used to get jQuery 1.5.1 working can be found in orslumen@c3e702c
Some fixes were needed to get jQuery 1.5.1 working with EnvJs in Ruby Racer:
i) The
jQuery.clonemethod uses an expando attribute that is removed injQeury.cloneFixAttributes. But that attribute may not be present on the current node. Ifdoc.implementation.errorChecking === falseit should fail silently, seeNamedNodeMap#removeNamedItem(NS).ii) jQuery directly retrieves and sets the value attribute on the nodes, but (at least in Ruby Racer) the NamedNodeMap does not accept a call to value=. To fix this, explicit getter and setters are added, see
NamedNodeMap#get/set valueiii)
jQeury.cloneFixAttributesmakes use ofElement.clearAttributesandElement.mergeAttributes. Both methods were not defined yet.The code changes I used to get jQuery 1.5.1 working can be found in orslumen@c3e702c