I hacked away at this way to extend jQuery as an ES6 class. It seems to accomplish everything, but I am concerned about speed, so I also ran a test. It can create 1000 new instances of itself in under 0.5 seconds. This is to be used at MOST for generating table rows that are objects (for complex, updating tables that do not empty themselves). I am wondering if there is a better way to inherit the jquery prototypes than this
this.__proto__ = $.extend(true, this.__proto__, this.__proto__.__proto__)
class Popup extends jQuery.fn.init {
constructor() {
super('<div>test</div>');
this.$wrapper = null;
this.__proto__ = $.extend(true, this.__proto__, this.__proto__.__proto__)
return this;
}
test() {
console.log('hi')
}
}