In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use callbacks.fire (), has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Callbacks.fire (arguments)
Description: all callbacks are called by passing in the specified parameters
Added version: 1.7callbacks.fire (arguments)
Arguments
Type: Anything
This parameter or parameter list is returned to the callback list.
This method returns the callback object (this) that binds it.
Example
Use callbacks.fire () to invoke the callback in the list with any passed arguments:
/ / a sample logging function to be added to a callbacks list
Var foo = function (value) {
Console.log ("foo:" + value)
}
Var callbacks = $.Callrooms ()
/ / add the function "foo" to the list
Callbacks.add (foo)
/ / fire the items on the list
Callbacks.fire ("hello"); / / outputs: "foo: hello"
Callbacks.fire ("world"); / / outputs: "foo: world"
/ / add another function to the list
Var bar = function (value) {
Console.log ("bar:" + value)
}
/ / add this function to the list
Callbacks.add (bar)
/ / fire the items on the list again
Callbacks.fire ("hello again")
/ / outputs:
/ / "foo: hello again"
/ / "bar: hello again"
Thank you for reading this article carefully. I hope the article "how to use callbacks.fire ()" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.