JSFiddle - React, Tailwind, and code Playground
by ariehg
JavaScript
;(function(){
var old = [];
for (var i=0,l=arguments.length;i<l;i++){
old[i]=arguments[i].prototype.appendChild;
arguments[i].prototype.appendChild = (function(i){
return function(){
console.log(arguments[0]);
old[i].apply(this,arguments);
}
})(i);
}
})(HTMLBodyElement,HTMLDivElement);
var a = document.createElement('div');
a.innerHTML = 'a';
var b = document.createElement('a');
a.appendChild(b);
b.innerHTML = 'b';
document.body.appendChild(a);