JSFiddle - React, Tailwind, and code Playground

by midesowunmi

JavaScript

function wrap(object, method, wrapper) {
 var fn = object[method];
    return object[method] = funtion(){
                   return wrapper.apply(this, [fn.bind(this)].concat(
                       Arry.prototype.slice.call(arguments)));
                   };
}
function bind(context, name){
  return function() {
     return context[name].apply(context, arguments);
  }
}
if (Prototpe.Browser.Opera) {
 wrap(Element.Methods, "readAttribute",
      function(original, elem, attr){
      return attr == "title" ?
          elem.title :
      original(elem, attr);
      });
}