JSFiddle - React, Tailwind, and code Playground
by Zevan
JavaScript
var o = {
extendMe : function(){
alert("hijack");
}
}
function extender(target, addon){
var t = target;
target = function(){
t.apply(null, arguments);
addon.apply(null, arguments);
}
}
o.extendMe();
var t = o.extendMe;
o.extendMe = function(){
t();
alert("joe");
}
o.extendMe();
// function name property>?
function FirstTimer(){
alert("once");
alert("init");
this.a = 100;
}
FirstTimer.prototype = {
run : function(){
alert("running");
}
}
/*
var a = new FirstTimer();
alert(a.a);
a.run();
var b = new FirstTimer();
b.run();
*/