Open DrSensor opened 1 year ago
I'm thinking to support swapping html too but it may require morphdom. Maybe this case should be handled by <go-to>
or <morph-to>
element #12 rather than specifying it as additional attributes 🤔
EDIT: Apparently there is separate issue for that 😅 #29
TODO:
<data>
element akin to <th>
<th>
but without <table>
🤔itemprop
attributeitemscope
attribute via -let="<ident>"
<table>
, <ul>
, etcFormData
only know multipart/form-data
, so don't pursue multipart/mixed
(caveat) and just use multipart/form-data
🤔 (where each item is Content-Type: application/http
)Most likely gonna change:
-load.data
into -itemsrc
$update
and friends into #item.update
and so onHopefully this make the attribute name reflect the microdata model pattern 🤲
About batch request, I think this might work
const form = new FormData()
form.append(uuid, new Blob(
req_toHTTP1_str(
new Request(...)).toWellFormed(),
{ type: "application/http" }
))
fetch(url, {
method: "POST",
headers,
cache: "no-store",
body: form,
signal: abort.signal,
})
Although this use GAS (Google Apps Script), not Web API, at least it give a general idea how to do batch request https://github.com/tanaikech/BatchRequest/blob/master/BatchRequests.js#L234,
Inspired from htmx but use any arbitrary data format for data binding instead of swapping html.
$send.method=PUT $send-request.param="user=[my.name~>str.snakecase]"
$update.method=PATCH $update.param="formatkey=snakecase"
$reload.method=GET -load.method=GET>
name: <input type=text ~ .value="my.name<~>str.capitalize">
<button disabled ~ !disabled $reload=#item @click=debounce:$reload> Reload
<button disabled ~ !disabled $update=#item @click=$update $update.toggle=disabled> Update
<button disabled ~ !disabled $send=#item -request.0=/notify/user -request.1=/notify/group @click="$send $send-request"> Force Update
In that example, each
<link>
is a record. However, it also applicable on table too (i.e via html attributetype=text/csv
or response headerN-Data-Format: column
) which need<template>
to render each<li>
.