Andrea Giammarchi
banner
webreflection.bsky.social
Andrea Giammarchi
@webreflection.bsky.social
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...
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...
es.discourse.group
November 10, 2025 at 10:46 AM
so ... TOON is basically JSONH but 14 years later? ... cool 🙄

medium.com/medialesson/...

github.com/WebReflectio...
JSON vs TOON — A new era of structured input?
Why structure matters more than ever
medium.com
November 10, 2025 at 9:04 AM
Reposted by Andrea Giammarchi
I guess the idea that a customer might be away from home isn't intuitive to A FUCKING AIRLINE
November 7, 2025 at 11:21 AM
Reposted by Andrea Giammarchi
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
November 7, 2025 at 11:03 AM
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...
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.
github.com
November 7, 2025 at 11:29 AM
brainstorming uhtml v5 and if you have hints/ideas/comments you are more than welcome to chime in 🙏

github.com/WebReflectio...
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...
github.com
October 31, 2025 at 4:29 PM
a quick introduction to regurlator 😇

www.youtube.com/watch?v=BJKm...
Introducing Regurlator Web Extension
YouTube video by Andrea Giammarchi
www.youtube.com
October 30, 2025 at 1:22 PM
regurlator - Chrome Web Store
A RegExp URL Redirector
chromewebstore.google.com
October 29, 2025 at 2:58 PM
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...
GitHub - WebReflection/regurlator: A RegExp URL Redirector.
A RegExp URL Redirector. Contribute to WebReflection/regurlator development by creating an account on GitHub.
github.com
October 28, 2025 at 11:52 AM
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...
Chromium
issues.chromium.org
October 24, 2025 at 10:19 AM
watch out developer.mozilla.org/en-US/docs/W... returns true while live-debugging because typing in devtools automatically activate transient mode.

This might be a huge source of confusion and WYSI-NOT-WYG 👋
UserActivation: isActive property - Web APIs | MDN
The read-only isActive property of the UserActivation interface indicates whether the current window has transient user activation.
developer.mozilla.org
October 24, 2025 at 8:44 AM
TIL: if you store in IndexedDB a granted FileSystemX handler you should als store with it options because if you close and reopen the browser, or create a new session, that handler will not work unless you check again against its permissions.
Only then it prompts: once or always?
October 23, 2025 at 10:51 AM
Davie504 is suing Suno AI and for very valid and good reasons: www.youtube.com/watch?v=RNHx...
I'm Suing
YouTube video by Davie504
www.youtube.com
October 22, 2025 at 8:32 AM
TIL: event.intercept(...) after navigation.addEventListener('navigate', ...) 🤯

developer.mozilla.org/en-US/docs/W...
NavigateEvent: intercept() method - Web APIs | MDN
The intercept() method of the NavigateEvent interface intercepts this navigation, turning it into a same-document navigation to the destination URL.
developer.mozilla.org
October 18, 2025 at 2:13 PM
best honest video I've seen around Linux as developer:
www.youtube.com/watch?v=GQJZ...
Apple Introduces The Year Of The Linux Desktop!
YouTube video by ThePrimeTime
www.youtube.com
October 17, 2025 at 12:54 PM
in which I've found a way to have "protected" properties only the class owner can handle.

these can also be orchestrated as accessor:

static a(self, ..._) {
if (_.length) [self.#a] = _;
return self.#a;
}
October 14, 2025 at 8:18 AM
Web extensions can query tabs and each tab can have a unique identifier that persist across refreshes but it's unique per tab (just like sessionStorage)

if you need similar unique identifier on the server (uid per tab persistent on refreshes) here a demo:
webreflection.github.io/session/
@webreflection/session
webreflection.github.io
October 7, 2025 at 1:05 PM
I need to ask this: how is it possible that `sessionStorage` cannot be replicated, as unique tab identity, on the server? My exploration tells me is entirely a browsers’ fault and nothing else … who has a reliable solution out there? (Nobody to my understanding) 🤦
September 22, 2025 at 6:06 PM
A Service Worker nightmare

used as fallback to sync blocking POST messages to circumvent the absence of SharedArrayBuffer, it needs hacks to resurrect such SW on occasions (open/close devtools, as example).

On iOS / iPadOS devices that SW dies and there's nothing one can do 🤦
September 18, 2025 at 8:48 AM
TIL ... WebNN (Neural Network) API ... I feel like this is needed "yesterday" already, hope to see it implemented soon in all relevant browsers

www.w3.org/TR/webnn/
Web Neural Network API
www.w3.org
September 16, 2025 at 1:23 PM
I've lost the count of times I've written:

el.append(
Object.assign(
document.createElement('div'),
{ textContent: '...', className: '...', onclick: ... }
)
)

so I've written a minimalistic helper that does just that and very little more 😇

github.com/WebReflectio...
GitHub - WebReflection/element: A minimalistic DOM element creation library.
A minimalistic DOM element creation library. Contribute to WebReflection/element development by creating an account on GitHub.
github.com
September 12, 2025 at 11:14 AM
mixed feelings around JS prototype pollution ability: it has been playing really well for polyfills to date but it allows any malicious code to observe/intercept everything the env does, especially `await` operations via Promise.prototype.then pollution
Any other PL like that? 🤔
September 5, 2025 at 4:50 PM
is this a @TauriApps alternative that actually just needs node/bun ffi and for some reason I had no idea about it? 🤔

github.com/saucer/saucer
GitHub - saucer/saucer: 🛸 A modern, cross-platform C++ webview library
🛸 A modern, cross-platform C++ webview library. Contribute to saucer/saucer development by creating an account on GitHub.
github.com
August 23, 2025 at 11:15 AM
highly inspired by Geist UI File-Tree a made a custom element that should "just work" with minimal size and zero tooling needed!

demo: webreflection.github.io/file-tree/te...

project: github.com/WebReflectio...
Document
webreflection.github.io
August 21, 2025 at 12:05 PM