Andrea Giammarchi's Avatar

Andrea Giammarchi

@webreflection.bsky.social

931 Followers  |  28 Following  |  159 Posts  |  Joined: 21.08.2023  |  1.6362

Latest posts by webreflection.bsky.social on Bluesky

> 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 β€” πŸ‘ 160    πŸ” 8    πŸ’¬ 27    πŸ“Œ 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
YouTube video by Andrea Giammarchi Introducing Regurlator Web Extension

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
Preview
UserActivation: isActive property - Web APIs | MDN The read-only isActive property of the UserActivation interface indicates whether the current window has transient user activation.

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 πŸ‘‹

24.10.2025 08:44 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

... aaaaand it's gone!
Chromium Version 141.0.7390.108 (Official Build) (64-bit) works like a charm (and so does Edge)

Chromium Version 141.0.7390.123 (Official Build) (64-bit) wants permissions granted via a resilient user action to reuse a handler it had permissions already 🀦

23.10.2025 11:28 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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?

23.10.2025 10:51 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
I'm Suing
YouTube video by Davie504 I'm Suing

Davie504 is suing Suno AI and for very valid and good reasons: www.youtube.com/watch?v=RNHx...

22.10.2025 08:32 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1
Preview
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.

TIL: event.intercept(...) after navigation.addEventListener('navigate', ...) 🀯

developer.mozilla.org/en-US/docs/W...

18.10.2025 14:13 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Apple Introduces The Year Of The Linux Desktop!
YouTube video by ThePrimeTime Apple Introduces The Year Of The Linux Desktop!

best honest video I've seen around Linux as developer:
www.youtube.com/watch?v=GQJZ...

17.10.2025 12:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

For reference: bsky.app/profile/webr...

Reads better than leaky symbols around to me

15.10.2025 17:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Readability is good to me (see the follow up with just static block, no need to delete) and security superior for real private fields no library can lurk around.

I’m sold, you do what’s best for you

15.10.2025 17:04 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

it leaks the symbol at the prototype level so … no? If you can host a symbol you can host a variable that won’t leak outside the module and it’s as fast as any shared accessor, if not faster

15.10.2025 07:05 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

it's lovely, isn't it? Although there was an even more elegant solution which doesn't require to delete anything at all 🀩

I just forgot about static classes initialization blocks πŸ₯³

bsky.app/profile/webr...

14.10.2025 10:25 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Static initialization blocks - JavaScript | MDN Static initialization blocks are declared within a class. It contains statements to be evaluated during class initialization. This permits more flexible initialization logic than static properties, su...

even simpler:

let a;
class A {
# a;
static {
a = self => self.#a;
}
}

thanks to static classes initialization block πŸ₯³
developer.mozilla.org/en-US/docs/W...

14.10.2025 10:22 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 0    πŸ“Œ 2
Preview
JavaScript β€œprotected” properties Private JS fields are both cool and β€œwasteful”, let me expand on that.

a follow up post to explain:

webreflection.medium.com/javascript-p...

14.10.2025 08:49 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
class A {
  #a;
  constructor(a) {
    this.#a = a;
  }

  // allowed to reach #a
  static a(self) {
    return self.#a;
  }
}

const a = A.a;

// removed to avoid reaching #a
// outside this module scope
delete A.a;

const ref = new A('secret');

// in here we can reach #a
a(ref); // 'secret'

class A { #a; constructor(a) { this.#a = a; } // allowed to reach #a static a(self) { return self.#a; } } const a = A.a; // removed to avoid reaching #a // outside this module scope delete A.a; const ref = new A('secret'); // in here we can reach #a a(ref); // 'secret'

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;
}

14.10.2025 08:18 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 2    πŸ“Œ 1
Preview
GitHub - WebReflection/session: A unique session per tab idenfitier. A unique session per tab idenfitier. Contribute to WebReflection/session development by creating an account on GitHub.

... and the library behind ...
github.com/WebReflectio...

07.10.2025 13:05 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
@webreflection/session

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/

07.10.2025 13:05 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@webreflection is following 20 prominent accounts