Skip to content

Instantly share code, notes, and snippets.

@kentaromiura
Created February 17, 2010 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentaromiura/306978 to your computer and use it in GitHub Desktop.
Save kentaromiura/306978 to your computer and use it in GitHub Desktop.
<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