RE: [Jquery-dev] $.load()
I like the idea that there is a simple-argument way to do things
(.get/.post/.load) and a full-featured version (.ajax). At this point I
don't think the simple versions can be enhanced (in a backward compatible
way) without creating a lot more parameter hockey.
If anything, the problem with .load is that it tries to allow too many
argument permutations already, in addition to its off-label duty as a binder
for window.onload. Notice that although you can omit the params and specify
a callback as the second argument, it will get the ifModified flag wrong in
those cases. (Same problem in .get too.) Notice how clean .post is because
it doesn't play parameter games, although it still breaks the style of
having the callback be last.
The documentation on these methods gets a lot tougher when you can have an
almost-arbitrary list of arguments. Right now .load is documented one way,
as "load(url, params, callback)"; documenting the actual valid calling
sequences would make that a lot more complicated. If nobody is using the
other permutations we should take them out.
_______________________________________________
Jquery-dev mailing list
Jquery-dev@bassistance.de
http://lists.bassistance.de/mailman/listinfo/jquery-dev