flatted is out with a tiny yet important update for the JS variant: if you stringify 50K objects that point to each other you no longer have call stack recursion error on parse, it just works 🥳
flatted is out with a tiny yet important update for the JS variant: if you stringify 50K objects that point to each other you no longer have call stack recursion error on parse, it just works 🥳
in today "good morning OSS" news,
@golang
receives its first *flatted* implementation, making flatted now usable in JS, TS, Python, PHP and, ultimately Go 🥳
Huge thank to
Harald Fielker
for helping out (writing everything), lets' go beyond 300M Downloads!
github.com/WebReflectio...
or let's do it the other way around ... show me a single case where Shadow DOM and slots are better than anything I can do with that library and let's compare
Vue, React, Svelte, everything built with these + Tailwind CSS are the examples ... anything built with Shadow DOM is the counter example. I prefer the former, not sure what you are asking exactly
if the channel is *message*, you're all good, if it's *broadcast* you're still good!
if it's *xhr* you are on the slow path but it should still work, if it states *async* please let me know what platform/target/OS/device is it so I can investigate/rule that out of the project: 🙏
dear followers, I need to ask you a little favor: I am trying to fix the Web around SharedArrayBuffer and the ability to synchronize any task from a never blocking Worker, I need you to tell me if this page is blank or shows "async" as channel, thank you!
webreflection.pythonanywhere.com
the innerHTML is a (arguably lame) example of anything else you can do, there just to prove the live test page is working anywhere you can try.
the advantage of not having ShadowDOM is:
* all CSS reset/libraries work out of the box
* no JS is needed to render components (ignore innerHTML)
* easier
there's one primitive missing on the Web and that's the ability to synchronously make a Worker busy while querying the main thread ... in coincident I've solved that but the missing primitive is hurting a lot (for debugging reasons) so ... here I am again:
github.com/WebReflectio...
even with shadow dom *SOME* style cascades anyway, it's misleading and bloat prone since its appearance on the Web, here you just style components contents like you would style any regular element on the web because ... those are real elements of the web
I’ve fixed a few hiccups here and there, mostly related to the ability to style [is=“ce-name”] even if created at runtime + ability to automatically create regular custom elements that extend HTML.Element.
The /auto variant on CDN lazy load for Safari in less than blink too 🥳
today I’ve quickly glued together two libraries that makes custom elements without shadow dom as fast and as simple as it can get and for every browsers … after reading the N post about ShadowDOM issues with CSS.
You can stop that madness already 👋
github.com/WebReflectio...
JS Proxy are wonderful, penalized by TS inability to actually understand/deal with these but the things that these unlock are incredible!
It might be a niche use case but if you need cached results, here my next go-to library:
github.com/WebReflectio...
live demo on codepen:
codepen.io/WebReflectio...
try to compare its code with the original one 😉
this might be handy for any "forever waiting" pattern that requires instant reactivity + it doesn't leak compared to the original post that inspired it 😇
github.com/WebReflectio...
a common complain about our minimalistic TOML parser is that it wouldn't support trailing commas ... well, v0.4.0 does now, keeping it ~540bytes after brotli 🥳
github.com/WebReflectio...
> I would probably only replace partial parts of the document and not a nav with a search input in it.
agreed, but that's *not* how specs work ... these need to address all edge cases too or ... good luck
this is *very* close to a SSR hydration concept and while I welcome this feature as I think it's awesome for HN or X like streams (or chats or list-items, or ...) I wonder what happens if the page had an input in that <nav>, somebody started typing in it (a11y tools too) and that gets replaced ... 🤔
if you use Proxies and you bind methods returned on `get` trap, please read carefully why that's a bad idea and how to avoid doing that:
es.discourse.group/t/reflect-se...
so ... TOON is basically JSONH but 14 years later? ... cool 🙄
medium.com/medialesson/...
github.com/WebReflectio...
I guess the idea that a customer might be away from home isn't intuitive to A FUCKING AIRLINE
A list of locations in German
Great, so www.britishairways.com
🎉 Displays in geo language rather than user language
🎉 The language picker is at the bottom of a long page
🎉 The language picker is in the current language, so in order to select "United Kingdom", I need to know what that is in German
honestly, as much as I hate User Agent sniffing, whenever I travel and find unreadable websites because they decided the lang should be the one I've just travelled to upsets me every. single. time
on top of that, mapping IP to languages is a waste of money for most cases, it requires a db + it fails
cleaning up signals effects automatically on vanilla DOM cases might be tricky ... the fact an inner node contains references to its parent makes it hard to do so via FinalizationRegistry but thanks to Proxy/WeakRef it's possible to make it easy: weaky 🥳
github.com/WebReflectio...
brainstorming uhtml v5 and if you have hints/ideas/comments you are more than welcome to chime in 🙏
github.com/WebReflectio...
a quick introduction to regurlator 😇
www.youtube.com/watch?v=BJKm...
tired of looking for "Open in Browser" links ???
I did create WebJeans and Woom (local only) but the pattern is always the same so I've put an end to this pointless struggle and published regurlator extension: you are in charge, you can redirect anything!
github.com/WebReflectio...
this bug is the reason I am trying to provide a basic utility that would take care of everything out of the box as the dance to persist users' choice on local FileSystem access is nearly unbearable and convoluted in branches and operations to do ... 🥲
issues.chromium.org/issues/45453...