🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@gibson042
Copy link
Member

Fixes gh-3469

@mention-bot
Copy link

@gibson042, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jaubourg, @markelog and @adamcoulombe to be potential reviewers.

@mgol
Copy link
Member

mgol commented Dec 23, 2016

I can't find any documentation that would explain why callbacks.add(fn) on a locked callbacks object is supposed to run the function. Is the documentation lacking or am I just not seeing it?

@dmethvin
Copy link
Member

memory: Keeps track of previous values and will call any callback added after the list has been fired right away with the latest "memorized" values (like a Deferred). https://api.jquery.com/jQuery.Callbacks/

If the Callbacks object is created with the "memory" flag as its argument, additional functions may be added and fired after the callback list is locked. https://api.jquery.com/callbacks.lock/

Not sure if that makes total sense to me, but those are the docs.

@gibson042
Copy link
Member Author

gibson042 commented Dec 23, 2016

Right, it's actually the difference between .lock() and .disable().

@dmethvin
Copy link
Member

Yeah, mainly trying to think of specific use cases for all the Callbacks options. Clearly we haven't even probed them all for core. :)

@timmywil timmywil added this to the 3.2.0 milestone Jan 9, 2017
@gibson042 gibson042 merged commit 9d822bc into jquery:master Jan 9, 2017
@gibson042
Copy link
Member Author

This broke an effects test; I'm investigating now. http://swarm.jquery.org/job/4519

@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants