JSFiddle - React, Tailwind, and code Playground

by deadlyicon

HTML

<a> hello there </a>

JavaScript

;(function(sub$){
    
    // we need to add this
    sub$.fn.superclass = sub$.superclass.fn;

    sub$.fn.remove = function(){
       console.log('calling remove', this.remove === this.__proto__.__proto__.remove);
       //return this.__proto__.__proto__.remove.apply(this, arguments); 
       //return this.constructor.superclass.fn.remove.apply(this, arguments); 
       return this.superclass.remove.apply(this, arguments);
    };
    
    setTimeout(function(){
       sub$('a').remove();
    },1000);
    
    window.sub$ = sub$;
    
})($.subclass());