Created
February 17, 2010 19:57
-
-
Save kentaromiura/306963 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Sarissa glitch with mootools</title> | |
<script type="text/javascript" src="sarissa.js"></script> | |
<script type="text/javascript" src="sarissa_ieemu_xpath.js"></script> | |
<script type="text/javascript" src="mootools-1.2.4-core-nc.js"></script> | |
<script type="text/javascript"> | |
addEvent('domready',function(){ | |
source = '<root><burp decibel="too much" direction="front of you" save="none"></burp></root>'; | |
var doc = (new DOMParser()).parseFromString(source, "text/xml"); | |
var burp = doc.selectNodes("//burp")[0]; | |
var shoutAttr = function(attr){alert([attr.name,":",attr.value].join(""));}; | |
/* | |
* This code work in ie*/ | |
for(var i=0,max=burp.attributes.length;i<max;i++){ | |
var attr=burp.attributes[i]; | |
shoutAttr(attr); | |
} | |
// this throws error(s) | |
// $each(burp.attributes,shoutAttr); | |
}); | |
</script> | |
</head> | |
<body>Foo</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment