You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.0 KiB
JavaScript

define([
"dojo/on",
"dojo/_base/array", // array.forEach
"dojo/keys", // keys.ENTER keys.SPACE
"dojo/_base/declare", // declare
"dojo/has", // has("dom-addeventlistener")
"./a11yclick"
], function(on, array, keys, declare, has, a11yclick){
// module:
// dijit/_OnDijitClickMixin
var ret = declare("dijit._OnDijitClickMixin", null, {
// summary:
// Deprecated. New code should access the dijit/a11yclick event directly, ex:
// | this.own(on(node, a11yclick, function(){ ... }));
//
// Mixing in this class will make _WidgetBase.connect(node, "ondijitclick", ...) work.
// It also used to be necessary to make templates with ondijitclick work, but now you can just require
// dijit/a11yclick.
connect: function(obj, event, method){
// override _WidgetBase.connect() to make this.connect(node, "ondijitclick", ...) work
return this.inherited(arguments, [obj, event == "ondijitclick" ? a11yclick : event, method]);
}
});
ret.a11yclick = a11yclick; // back compat
return ret;
});