Skip to content

Instantly share code, notes, and snippets.

@yv84
Created July 29, 2016 13:07
Show Gist options
  • Save yv84/8d1a66499fb63ee764709ff62b2a1034 to your computer and use it in GitHub Desktop.
Save yv84/8d1a66499fb63ee764709ff62b2a1034 to your computer and use it in GitHub Desktop.
YUI-dojo events.js
require(["dojo/_base/connect"], function(connect){
connect.subscribe("handleFieldChange", function(event, message){
console.log("dojo_subscribe->" + event.x);
debugger;
});
});
YAHOO.Bubbling.on("handleFieldChange", function(e, param) {
console.log("YAHOO_on->" + e + param[1].x);
debugger;
}, this);
require(["dojo/_base/connect"], function(connect) {
connect.publish("handleFieldChange", {
x: "dojo_publish",
y: "dojo_publish"
});
});
YAHOO.Bubbling.fire("handleFieldChange", {
x: "YAHOO_fire",
y: "YAHOO_fire"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment