Created
February 17, 2010 20:18
-
-
Save kentaromiura/306978 to your computer and use it in GitHub Desktop.
This file contains 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>Mootools $type and ActiveXObject</title> | |
<script type="text/javascript" src="mootools-1.2.4-core-nc.js"></script> | |
<script type="text/javascript"> | |
addEvent('domready',function(){ | |
var doc = new ActiveXObject("Msxml2.DOMDocument.4.0"); | |
var source = '<root><burp decibel="too much" direction="front of you" save="none"></burp></root>'; | |
doc.async = false; | |
doc.loadXML(source); | |
var burp = doc.selectNodes("//burp")[0]; | |
var shoutAttr = function(attr){alert([attr.name,":",attr.value].join(""));}; | |
$type(burp.attributes); | |
}); | |
</script> | |
</head> | |
<body>Foo</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment