"why do you use safari?"
@jakelazaroff.com
nyc-based programmer and designer. alum @recurse.com. azzajew. public transit enjoyer. thoughts on local-first software, javascript frameworks, web components, css and other web minutiae. π https://jakelazaroff.com
"why do you use safari?"
would love for this lil web component i wrote to become obsolete!
npmx.dev/package/rovi...
I'm so tired of automated thinking machines.
Make my thinking *better* or it's worthless.
AI gets better if it makes humans better
i can't get over describing the coalition of the mayor of new york city as "young people in cities" π
maybe find a way to cope without telling jews to accept the support of someone who wants to murder us
if you are telling me to welcome the support of a neo-nazi i'm gonna assume that you're a neo-nazi as well
modern CSS is so good
Another custom select list using using appearance: base-select.
On browsers that don't yet support this, a normal select list will be displayed.
See the full demo on @codepen.io codepen.io/cbolson/pen/...
thank you so much! i actually also built learn.yjs.dev π (with @paulbutler.org and @taylorbaldwin.bsky.social)
i mean, i hope you're right! but i don't think that's a forgone conclusion
i agree but you don't also see LLMs as a threat to the web, in the sense that people may come to use them as an intermediary to summarize websites without visiting them? there are a lot of techbros who want their chatbot to be *the* information gateway and it's not implausible that one will succeed.
i think if you aren't sure what the semantics are then it's fair to say that this is not actually standard functionality that everyone already uses
i do too, but the level of effort required today to write a full-blown HTML parser with declarative bindings is orders of magnitude higher than: given that templating system, write a few lines to add syntax sugar for event listeners
same question as with the @event thing though β why does this need to be part of a native templating API? you could do this in userland with whatever semantics you wanted by writing a tagged template function.
sure. the line is subjective. i think the crux of our disagreement is that i see a native templating API as a low-level tool on top of which to build abstractions, rather than something app devs should be using directly. i'd cover the slow/error-prone parts rather than add sugar
just my two cents π€·ββοΈ
it just makes the web platform as a whole more complicated than it needs to be. like, browsers now have to support popovertarget and popovertargetaction in perpetuity even though command and commandfor are an all-around better API. all these little papercuts add up!
right but what does this mean with regard to HTML templating? like, what are the semantics? does a function get `children` as a DocumentFragment? does it need to return an Element? can you pass other "props" to it? etc
i think they are
that's my point β with directives/custom attributes/etc it's easy to write your declarative event binding in userland. if we standardize @event and .propβ¦ i mean, it doesn't *totally* close off the ability to use that syntax for something else in userland but it would make it extremely weird
unclear to me what html`<${Fn} />` would do?
i meant your example. <button ${event("click", () => console.log("hello"))}> builds it into the template system in a more general way.
imo the platform is just the wrong place for syntax sugar like this. easy to write a tagged template function that converts @click={foo} to ${event("click", foo)}
is that not building it in? the issue with the lit syntax isn't whether it's possible, it's whether to add a very specific syntactic sugar on top of it.
a DOM templating API would let you pass arbitrary javascript objects, right? so you could in theory do something like
<button on-event=${["click", () => console.log("hello")]}>
frankly the syntax is the least of my concerns. i don't think the functionality should exist at all. i'd much rather see
something like custom attributes, which would let us implement the same thing much more flexibly in userland
i mean fwiw the .prop and @event prefixes feel pretty idiosyncratic to lit
yeah trying to get htm playing nicely with typescript led me to that issue too. i think it would be a big squandered opportunity to add something peculiar to html templates rather than a primitive that we could use for generalized parsing of template strings.
idk if i'd call it visual noise⦠the whole reason i'm not using raw hyperscript in the first place is because i find HTML-ish syntax easier to read.
i think the function call syntax is tolerable if you use it for a few leaf components. if you have a bunch of complex or nested components it's rough.
both approaches kinda suck though imo!