I have been working extensively with Kendo UI windows and I am curious if there is a way to set default values on a global level. Alternatively, could I establish a parent window with predefined values and then selectively override the ones I want to change?
For instance, I would like all windows to share the same error behavior and modal parameter, so ideally I could define this in a parent window:
$("#parentWindow").kendoWindow({
modal: true,
error: function () {
this.close();
new Notification().error();
}
});
Then, I could use the parent window as a template for creating new windows:
$("#newWindow").kendoWindow({
title: "This window should inherit the modal and error options of the parentWindow",
}).??getTheRestOfTheValuesFromParent()??;
Or modify specific parameters directly:
$("#newWindow2").kendoWindow({
modal: false,
title: "A window with overridden modal parameter",
}).??getTheRestOfTheValuesFromParent()??;
Is it feasible to achieve this functionality? Is there any concept similar to C# inheritance in JavaScript? I apologize if this is a basic question, my familiarity with JS is limited.