Using Named Callback Functions In Javascript Methods