SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    What does this mean?

    I don't understand this code.

    function onclose(func){
    this.onclose_func = func;
    }

  2. #2
    SitePoint Member
    Join Date
    Nov 2009
    Location
    North Carolina
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks to me like it is taking a reference to a function as a parameter and then setting the this.onclose_func function to that function. What this probably means is the onclose function of object "this" is being overwritten such that when the onclose event is triggered it calls your reference function rather than the standard one.

    That's what I'm assuming but would need to do a little research to confirm.
    If I have been of help to you please consider making a
    donation for my time via PayPal here.
    Get a GREAT domain for under $20 each day via my
    STEAL of the DAY page.


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
  •