i had a problem and solving which required a functionality built in mootools
. so i began dissecting it.
there a function a am interested in
IframeShim.destroy
its like this
destroy: function(){
if (this.shim) this.shim.destroy();
return this;
}
now what i cant understand in this what is shim
.
Paricularly what i am trying to understand is
Request.JSONP.cancel
its code is like this
cancel: function(){
if (this.running) this.clear().fireEvent('cancel');
return this;
}
now this cancel calls clear
whose code is like this
clear: function(){
this.running = false;
if (this.script){
this.script.destroy();
this.script = null;
}
return this;
}
now in this clear function i can see destroy()
which takes me to shim
(see code at the top) and i m stuck.
All these functions are in mootools-more.js
Help?
it would be great if somebody could provide a plain javascript implementation of Request.JSONP.cancel
Does it have a JQuery
alternative?