XenConcept
Well-known member
I'm trying to extend my class js but I can not seem to get the original options
Original :
Extend :
Thank you for your help
Original :
JavaScript:
XF.SendMessage = XF.Click.newHandler({
eventNameSpace: 'XFSendMessageClick',
options: {
url_post: '{{ link('test/post.json') }}'
},
init: function () {},
click: function (e) {}
});
XF.Element.register('send-message', 'XF.SendMessage');
Extend :
JavaScript:
XF.Element.extend('send-message', {
options: $.extend({}, XF.SendMessage.prototype.options, {
test: 'test'
}),
init: function () {
},
click: function (e) {
console.log(this.options)
}
});
Thank you for your help