Skip to content

Instantly share code, notes, and snippets.

@bkardell
Last active December 20, 2015 19:48
Show Gist options
  • Select an option

  • Save bkardell/6185462 to your computer and use it in GitHub Desktop.

Select an option

Save bkardell/6185462 to your computer and use it in GitHub Desktop.
<html>
<head>
<style>
@keyframes nodeInserted {
from {
clip: rect(1px, auto, auto, auto);
}
to {
clip: rect(0px, auto, auto, auto);
}
}
@-moz-keyframes nodeInserted {
from {
clip: rect(1px, auto, auto, auto);
}
to {
clip: rect(0px, auto, auto, auto);
}
}
</style>
<script>
temp = [];
onDOMNodeInserted = function(event){
temp.push(event.srcElement.tagNAme)
}
document.addEventListener('animationstart', onDOMNodeInserted, false);
document.addEventListener('MSAnimationStart', onDOMNodeInserted, false);
document.addEventListener('webkitAnimationStart', onDOMNodeInserted, false);
</script>
<meta name="foo">
<link type="text/x-foo">
</head>
<body>
<h1>Omg..</h1>
<div id="result"></div>
<script>
document.getElementById("result").innerHTML = "added tags:" + temp.join(",");
</script>
</body>
</html>
<html>
<head>
<script>
var temp=[];
document.addEventListener("DOMNodeInserted", function (evt) {
temp.push(evt.srcElement.tagName);
});
</script>
<meta name="foo">
<link type="text/x-foo">
</head>
<body>
<h1>Omg..</h1>
<div id="result"></div>
<script>
document.getElementById("result").innerHTML = "added tags:" + temp.join(",");
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment