Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
zjquery: Allow $.Event as a constructor.
Anders Kaseorgf84fd0839dab
diff --git a/frontend_tests/zjsunit/zjquery.js b/frontend_tests/zjsunit/zjquery.jsindex 509cdf902f2..3ece134d585 100644--- a/frontend_tests/zjsunit/zjquery.js+++ b/frontend_tests/zjsunit/zjquery.js@@ -6,6 +6,9 @@ const noop = function () {};class Event {constructor(type, props) {+ if (!(this instanceof Event)) {+ return new Event(type, props);+ }this.type = type;Object.assign(this, props);}@@ -518,7 +521,7 @@ exports.make_zjquery = function (opts) {return res;};- zjquery.Event = (type, props) => new Event(type, props);+ zjquery.Event = Event;fn.after = function (s) {return s;