> I'm working on a patch to jQuery to make it so that initialization can
> support application specific objects through extensibility.

How about if your Widget had a method like:

Widget.prototype.jQueryGet = function(){
  return "#widget-"+this.id;
};

Then jQuery's init() could do something like this at the very top:

if ( selector && jQuery.isFunction(selector.jQueryGet) )
  selector = selector.jQueryGet(context);

Then you can expose whatever you want to jQuery (string selector, DOM
nodes, ready function, etc.) It's a single check in the constructor
rather than a chain of callbacks that have to be invoked on every
jQuery construction, so it certainly has performance going for it.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to