- From: Domenic Denicola <notifications@github.com>
- Date: Mon, 14 Oct 2019 22:35:58 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 15 October 2019 05:36:00 UTC
> For example, gzip will eventually have a filename option. It's not immediately clear to me how to handle this. There is a small precedent here with [`canvas.getContext()`](https://html.spec.whatwg.org/#dom-canvas-getcontext), whose second argument is an optional options object. This is handled on the spec level by declaring it `optional any` and then switching on the first argument before manually invoking the Web IDL "convert _arg_ to Y" algorithm, where Y is the specific dictionary type in question (e.g. [`CanvasRenderingContext2DSettings`](https://html.spec.whatwg.org/#canvasrenderingcontext2dsettings) vs. [`ImageBitmapRenderingContextSettings`](https://html.spec.whatwg.org/#imagebitmaprenderingcontextsettings). I think that's a reasonable pattern, both for spec-writing and for web developer usage. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/410#issuecomment-542044821
Received on Tuesday, 15 October 2019 05:36:00 UTC