zjquery: Add change, keypress, scroll events.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-07-20 23:28:21 -07:00 committed by Tim Abbott
parent f10020b0fd
commit 24aad216a6
1 changed files with 12 additions and 0 deletions

View File

@ -178,6 +178,10 @@ exports.make_new_elem = function (selector, opts) {
event_store.generic_event(self, "blur", arg); event_store.generic_event(self, "blur", arg);
return self; return self;
}, },
change: function (arg) {
event_store.generic_event(self, "change", arg);
return self;
},
click: function (arg) { click: function (arg) {
event_store.generic_event(self, "click", arg); event_store.generic_event(self, "click", arg);
return self; return self;
@ -286,6 +290,10 @@ exports.make_new_elem = function (selector, opts) {
event_store.generic_event(self, "keydown", arg); event_store.generic_event(self, "keydown", arg);
return self; return self;
}, },
keypress: function (arg) {
event_store.generic_event(self, "keypress", arg);
return self;
},
keyup: function (arg) { keyup: function (arg) {
event_store.generic_event(self, "keyup", arg); event_store.generic_event(self, "keyup", arg);
return self; return self;
@ -342,6 +350,10 @@ exports.make_new_elem = function (selector, opts) {
replaceWith: function () { replaceWith: function () {
return self; return self;
}, },
scroll: function (arg) {
event_store.generic_event(self, "scroll", arg);
return self;
},
scrollTop: function () { scrollTop: function () {
return self; return self;
}, },