Re: [heycam/webidl] Give Location an immutable prototype object (#606)

Rereading that thread makes me sad, but making things immutable makes me happy.

Doesn't HTML already cover this in https://html.spec.whatwg.org/multipage/history.html#location-setprototypeof ?

If we still need to do something  at the IDL level, the wording of this patch feels like a layering violation, to check for one interface here. I would prefer an ImmutablePrototype extended attribute. That's how I ended up implementing this in Blink anyway, for what it's worth (e.g., see [EventTarget's IDL](https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/dom/events/event_target.idl?q=Immutableprototype&sq=package:chromium&g=0&l=28); this avoids the need for the spec's nonlocal logic). Anyway even if you keep with the rationale from last time about not using the extended attribute for things in the global prototype chain (to make things easier for spec authors), I think it would be cleaner to do that here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/606#issuecomment-453085178

Received on Thursday, 10 January 2019 12:51:10 UTC