We are creating custom widgets that need to look, feel, and perform on-par with Kendo widgets. We've spent a little time in source and found some undocumented methods... like kendo.notify() that appear to play an important role in data binding.
Should or should we not be using these methods as we create our own widgets?
[ kendo.button.js ]
var Button = Widget.extend({
init: function(element, options) {
var that = this;
Widget.fn.init.call(that, element, options);
...
element
.on(CLICK + NS, proxy(that._click, that))
.on("focus" + NS, proxy(that._focus, that))
.on("blur" + NS, proxy(that._blur, that))
.on("keydown" + NS, proxy(that._keydown, that))
.on("keyup" + NS, proxy(that._keyup, that));
kendo.notify(that); // Implementation found in kendo.all.js on line ~11691
},
[ kendo.all.js ]
kendo.notify = notify;
...
function notify(widget, namespace) {
var element = widget.element,
bindingTarget = element[0].kendoBindingTarget;
if (bindingTarget) {
bind(element, bindingTarget.source, namespace);
}
}
Should or should we not be using these methods as we create our own widgets?
[ kendo.button.js ]
var Button = Widget.extend({
init: function(element, options) {
var that = this;
Widget.fn.init.call(that, element, options);
...
element
.on(CLICK + NS, proxy(that._click, that))
.on("focus" + NS, proxy(that._focus, that))
.on("blur" + NS, proxy(that._blur, that))
.on("keydown" + NS, proxy(that._keydown, that))
.on("keyup" + NS, proxy(that._keyup, that));
kendo.notify(that); // Implementation found in kendo.all.js on line ~11691
},
[ kendo.all.js ]
kendo.notify = notify;
...
function notify(widget, namespace) {
var element = widget.element,
bindingTarget = element[0].kendoBindingTarget;
if (bindingTarget) {
bind(element, bindingTarget.source, namespace);
}
}