mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 08:33:43 +00:00
zjquery: Add support for trigger() with string as argument.
This commit is contained in:
@@ -223,8 +223,8 @@ exports.make_zjquery = function () {
|
||||
return text;
|
||||
},
|
||||
trigger: function (ev) {
|
||||
var funcs = on_functions.get(ev.name) || [];
|
||||
|
||||
var ev_name = typeof ev === 'string' ? ev : ev.name;
|
||||
var funcs = on_functions.get(ev_name) || [];
|
||||
// The following assertion is temporary. It can be
|
||||
// legitimate for code to trigger multiple handlers.
|
||||
// But up until now, we haven't needed this, and if
|
||||
|
||||
Reference in New Issue
Block a user