Signup working with new db

This commit is contained in:
metacryst
2025-11-23 22:16:53 -06:00
parent c3ed5ac5ac
commit 8c7ed68975
8 changed files with 98 additions and 67 deletions

View File

@@ -1,6 +1,7 @@
/*
Sam Russell
Captured Sun
11.23.25 - Added onSubmit() event for form submission
11.20.25 - Added "pct" style unit, added alignVertical and alignHorizontal for flex boxes
11.19.25 - Allowing for "auto" values in otherwise numeric styles, adding vmin and vmax units
11.17.25.3 - Adding styles() and fixing dynamic function from earlier
@@ -907,6 +908,13 @@ HTMLElement.prototype.onInput = function(cb) {
return this;
};
HTMLElement.prototype.onSubmit = function(cb) {
if(!this.matches('form'))
throw new Error("Can't put form event on non-form element!")
this._storeListener("submit", cb);
return this;
};
HTMLElement.prototype.onTouch = function(cb) {
const onStart = () => cb.call(this, true);
const onEnd = () => cb.call(this, false);