Skip to content

Conversation

@ChadKillingsworth
Copy link
Contributor

The jQuery.Deferred description describes it as a constructor. This is misleading. The returned object fails the following checks:

(new jQuery.Deferred()) instanceof jQuery.Deferred === true //this is false
jQuery.Deferred() instanceof jQuery.Deferred === true //this is false

Also, extending the prototype (inheriting) from the jQuery.Deferred method would not produce the expected results. (it would infact do nothing useful).

This update describes the method as a factory which returns a new deferred object which is consistent with the rest of the api site documentation.

For more info, see google/closure-compiler#767

I should have a CLA on file - if not, let me know.

@arthurvr
Copy link
Member

I should have a CLA on file - if not, let me know.

For me it seems like you don't. Remember that the email and name in your git config must match the ones you signed the CLA with. If you already signed it with other name/email, you can change your git config or re-sign the CLA.

@ChadKillingsworth
Copy link
Contributor Author

You are correct - wrong email (just switched my global config recently). Author information changed - and new CLA signed.

@arthurvr
Copy link
Member

arthurvr commented Mar 7, 2015

@dmethvin @timmywil Are we okay with this change?

@timmywil
Copy link
Member

timmywil commented Mar 7, 2015

Factory is more accurate, but it may not always be a factory. Regardless, it's probably better than referring to it as a constructor.

@arthurvr
Copy link
Member

arthurvr commented Mar 8, 2015

Factory is more accurate, but it may not always be a factory. Regardless, it's probably better than referring to it as a constructor.

Shall I land this, or do we want to think about another name for it?

@timmywil
Copy link
Member

timmywil commented Mar 8, 2015

Sorry to confuse. You should land.

@arthurvr arthurvr closed this in ac8f3e1 Mar 9, 2015
@ChadKillingsworth ChadKillingsworth deleted the deferred-description branch June 8, 2015 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants