mysterious-toddler-20573
03/12/2022, 7:52 PMmysterious-toddler-20573
03/12/2022, 7:52 PMgorgeous-airport-54386
03/12/2022, 7:54 PMgorgeous-airport-54386
03/12/2022, 7:54 PMgorgeous-airport-54386
03/12/2022, 7:56 PMjs
class {
name = 'Wilbur';
bind() {
const { name } = this;
return sheet`
.name {
--name: ${name};
text: var(--name);
}
`;
}
}gorgeous-airport-54386
03/12/2022, 7:57 PMapplescript
set :name to "Wilbur"
put :name into memysterious-toddler-20573
03/12/2022, 7:58 PMgorgeous-airport-54386
03/12/2022, 8:04 PMapplescript
init make an EventTarget called :name then send change(value: "Wilbur") to it
on change(value) from :name put value into mewide-byte-19002
03/12/2022, 8:08 PMjson-enc extension on my form. I have added it but the request isn't sending the parameters as JSON. Any ideas what I'm doing wrong?
html
<form hx-post="http://localhost:9000/customers" hx-ext="json-enc">wide-byte-19002
03/12/2022, 8:08 PMform datagorgeous-airport-54386
03/12/2022, 8:09 PMwide-byte-19002
03/12/2022, 8:11 PMgorgeous-airport-54386
03/12/2022, 8:13 PMwide-byte-19002
03/12/2022, 8:13 PMgorgeous-airport-54386
03/12/2022, 8:13 PMwide-byte-19002
03/12/2022, 8:14 PMgorgeous-airport-54386
03/12/2022, 8:14 PMwide-byte-19002
03/12/2022, 8:15 PMhtml
<script src="https://unpkg.com/htmx.org@1.7.0" integrity="sha384-EzBXYPt0/T6gxNp0nuPtLkmRpmDBbjg6WmCUZRLXBBwYYmwAUxzlSGej0ARHX0Bo" crossorigin="anonymous"></script>gorgeous-airport-54386
03/12/2022, 8:15 PMhttps://unpkg.com/htmx.org@1.7.0/dist/ext/json-enc.jswide-byte-19002
03/12/2022, 8:15 PMwide-byte-19002
03/12/2022, 8:16 PMwide-byte-19002
03/12/2022, 8:17 PMhundreds-camera-24900
03/12/2022, 10:58 PMmysterious-toddler-20573
03/13/2022, 12:32 AMmysterious-toddler-20573
03/13/2022, 12:33 AMmysterious-toddler-20573
03/13/2022, 12:33 AMmysterious-toddler-20573
03/13/2022, 12:33 AMancient-shoe-86801
03/13/2022, 2:07 AM<div id="modals"></div> at the bottom of the body, and then simply doing requests like <img hx-get="/foo" hx-target="#modals" src="myicon.svg">. I was wondering if there is a more elegant way to do it.ancient-shoe-86801
03/13/2022, 2:10 AMancient-shoe-86801
03/13/2022, 2:10 AM