SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2004
    Location
    Third Stone From The Sun
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Library that supports XHR events?

    What libraries support subscribing to SUCCESS, COMPLETE, FAILURE, ABORT ?

    Most of them have merely a DI for a callback, e.g. onsuccess = your_function;

    That is weak.
    My outdated site is down for a while now.

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Prototype does, I think. At least I seem to remember that you could pass an object literal to the function with values to bind functions to the other onXxx events.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2004
    Location
    Third Stone From The Sun
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think what you're saying is that you can pass an object literal in that has success callback, failure callback, et c.

    That's a DI. Prototype has finer-grained event types, than say YUI.

    I don't want DI.

    I want
    Code:
    conn = createConnection(url, meth);
    conn.subscribe(SUCCESS, aFUnction);
    conn.subscribe(FAILURE, anotherFn);
    conn.subscribe(ABORT, connectionAborted);
    conn.subscribe(COMPLETE, allDoneFunction);
    It's the same thing as comparing onclick to addListener("click", callback). Just we're talking remote callbacks, not domestic ones.
    My outdated site is down for a while now.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •