So I wrote this little component.
-
So I wrote this little component. If the JS for the component didn’t load for some reason, the form will work normally based on submit. If the custom element loads, though, it will watch for change events on the form, and sync the entity in the current context based on the context name (so, the current PC in this case) through fetch() and preventDefault on the submit event since we’re syncing on every change instead.
No shadow DOM, fully progressively enhanced, and works off my generic entity system so any entity will just work.
-
Jan Lehnardt :couchdb:replied to Kat Marchán 🐈 last edited by
@zkat :sickos-yes: I’ve said it before but you are building my holy grail.
-
Kat Marchán 🐈replied to Jan Lehnardt :couchdb: last edited by
@janl this would be very straightforward to do with pouchdb ofc
-
Jan Lehnardt :couchdb:replied to Kat Marchán 🐈 last edited by
@zkat I’m more interested in the handling forms on/offline w/ serialisation parts. Pouch of course can only help when you’re all JS.
-
Kat Marchán 🐈replied to Jan Lehnardt :couchdb: last edited by
@janl you can’t really do anything offline if you don’t have JS. Even if you do things with service workers those still need JS
-
-