ぼちぼち技術開発 主にjs,java等
var object = phina.util.EventDispatcher();
object.on("hello", function(e) {
console.log("Hello," + (e.name || "World") + "!");
});
object.flare("hello", {name: "axion014"}); // Hello, axion014!
var object = phina.util.EventDispatcher();
var func = function(e) {
console.log("Hello," + (e.name || "World") + "!");
};
object.on("hello", func);
object.off("hello", func);
object.flare("hello", {name: "axion014"});
var object = phina.util.EventDispatcher();
object.one("hello", function(e) {
console.log("Hello," + (e.name || "World") + "!");
});
object.flare("hello", {name: "axion014"}); // Hello, axion014!
object.flare("hello", {name: "axion014"});
var object = phina.util.EventDispatcher();
var func = function(e) {
console.log("Hello," + (e.name || "World") + "!");
object.off("hello", func);
};
object.on("hello", func);
object.flare("hello", {name: "axion014"}); // Hello, axion014!
object.flare("hello", {name: "axion014"});
object.flare("something", {s: "hoge"});
object.fire({type: "something", s: "hoge"});
var object = phina.util.EventDispatcher();
object.on("something", function() {});
console.log(object.has("something"));
var object = phina.util.EventDispatcher();
console.log(object.has("something"));
var object = phina.util.EventDispatcher();
object.on("something", function() {});
object.on("something", function() {});
object.clear("something");
console.log(object.has("something"));