Andrea Giammarchi's Avatar

Andrea Giammarchi

@webreflection

936
Followers
28
Following
174
Posts
21.08.2023
Joined
Posts Following

Latest posts by Andrea Giammarchi @webreflection

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 🥳

08.03.2026 16:45 👍 0 🔁 0 💬 0 📌 0
Preview
GitHub - WebReflection/flatted: A fast and minimal circular JSON parser. A fast and minimal circular JSON parser. Contribute to WebReflection/flatted development by creating an account on GitHub.

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...

02.03.2026 10:28 👍 0 🔁 0 💬 0 📌 0

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

28.02.2026 21:29 👍 1 🔁 0 💬 1 📌 0

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

28.02.2026 21:27 👍 0 🔁 0 💬 1 📌 0

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: 🙏

27.02.2026 14:48 👍 0 🔁 0 💬 1 📌 0
reflected ffi

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

27.02.2026 14:47 👍 0 🔁 0 💬 2 📌 0

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

23.02.2026 13:20 👍 1 🔁 0 💬 1 📌 0
Preview
GitHub - WebReflection/reflected: coming soon coming soon. Contribute to WebReflection/reflected development by creating an account on GitHub.

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...

17.02.2026 17:45 👍 1 🔁 0 💬 0 📌 0

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

16.02.2026 14:14 👍 0 🔁 0 💬 0 📌 0

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 🥳

07.02.2026 13:40 👍 1 🔁 0 💬 0 📌 0
Preview
GitHub - WebReflection/elements: HTML & SVG Custom Elements. HTML & SVG Custom Elements. Contribute to WebReflection/elements development by creating an account on GitHub.

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...

06.02.2026 21:19 👍 2 🔁 1 💬 3 📌 0
Preview
GitHub - WebReflection/cached-proxy: A cached Proxy with optional timeouts per property to simplify complex remote scenarios. A cached Proxy with optional timeouts per property to simplify complex remote scenarios. - WebReflection/cached-proxy

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...

04.02.2026 13:50 👍 1 🔁 0 💬 0 📌 0
Post image

live demo on codepen:
codepen.io/WebReflectio...

try to compare its code with the original one 😉

29.01.2026 13:25 👍 0 🔁 0 💬 0 📌 0
Preview
GitHub - WebReflection/gen-q: An efficient queue implementation for JavaScript. An efficient queue implementation for JavaScript. Contribute to WebReflection/gen-q development by creating an account on GitHub.

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...

28.01.2026 11:47 👍 2 🔁 0 💬 1 📌 0
Preview
GitHub - WebReflection/basic-toml: A simple TOML subset parser. A simple TOML subset parser. Contribute to WebReflection/basic-toml development by creating an account on GitHub.

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...

22.01.2026 11:57 👍 2 🔁 0 💬 0 📌 0

> 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

26.11.2025 20:32 👍 0 🔁 0 💬 1 📌 0

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 ... 🤔

20.11.2025 14:17 👍 1 🔁 0 💬 1 📌 0
Preview
GitHub - WebReflection/packatoon: Pack JSON collections as TOON like format Pack JSON collections as TOON like format. Contribute to WebReflection/packatoon development by creating an account on GitHub.

"Let's Call The Whole Thing Off" 🎶🎵

github.com/WebReflectio...

14.11.2025 09:45 👍 0 🔁 0 💬 0 📌 0
Preview
Reflect.set(...args, receiver) throwing for no reason I swear I read binding before and because that’s a delicate topic I’d like to explain to future readers how not to bind methods because: obj.method === obj.method should always be true obj.method in...

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...

10.11.2025 10:46 👍 0 🔁 0 💬 0 📌 0
Preview
JSON vs TOON — A new era of structured input? Why structure matters more than ever

so ... TOON is basically JSONH but 14 years later? ... cool 🙄

medium.com/medialesson/...

github.com/WebReflectio...

10.11.2025 09:04 👍 1 🔁 0 💬 1 📌 0
Preview
Sickos - Wikipedia

VPN providers being like ...

en.wikipedia.org/wiki/Sickos#...

07.11.2025 15:06 👍 1 🔁 0 💬 0 📌 0

I guess the idea that a customer might be away from home isn't intuitive to A FUCKING AIRLINE

07.11.2025 11:21 👍 103 🔁 3 💬 3 📌 1
A list of locations in German

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

07.11.2025 11:03 👍 159 🔁 8 💬 26 📌 3

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

07.11.2025 15:02 👍 1 🔁 0 💬 0 📌 0
Preview
GitHub - WebReflection/weaky: An easy way to avoid leaks. An easy way to avoid leaks. Contribute to WebReflection/weaky development by creating an account on GitHub.

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...

07.11.2025 11:29 👍 1 🔁 0 💬 0 📌 0
Preview
Re-thinking uhtml v5 · WebReflection uhtml · Discussion #160 So, I've clearly made a mistake in current v5 implementation: I've introduced a hybrid model where both render and reactivity via signals was backed in at the same time if signals are meant to defi...

brainstorming uhtml v5 and if you have hints/ideas/comments you are more than welcome to chime in 🙏

github.com/WebReflectio...

31.10.2025 16:29 👍 3 🔁 0 💬 0 📌 0
Introducing Regurlator Web Extension
Introducing Regurlator Web Extension YouTube video by Andrea Giammarchi

a quick introduction to regurlator 😇

www.youtube.com/watch?v=BJKm...

30.10.2025 13:22 👍 3 🔁 1 💬 2 📌 0
Preview
regurlator - Chrome Web Store A RegExp URL Redirector

regurlator is out 🥳

chromewebstore.google.com/detail/regur...

29.10.2025 14:58 👍 0 🔁 0 💬 0 📌 0
Preview
GitHub - WebReflection/regurlator: A RegExp URL Redirector. A RegExp URL Redirector. Contribute to WebReflection/regurlator development by creating an account on GitHub.

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...

28.10.2025 11:52 👍 2 🔁 0 💬 0 📌 0
Chromium

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...

24.10.2025 10:19 👍 0 🔁 0 💬 0 📌 0