Re: [w3c/clipboard-apis] Add link-default for HTML's Navigator interface. (#147)

@tabatkins commented on this pull request.



> @@ -32,6 +32,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/interaction.html#; type: dfn;
  text: dom anchor
 url: https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2; type: dfn;
  text: the body element
+spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/system-state.html; type: interface;

Well, you don't need an `anchors` block to handle this in any case; when the link exists, and you just want to disambiguate them by default, a `link-defaults` block does so much more safely and easily.

```
<pre class=link-defaults>
spec: html; type: interface; text: Navigator
</pre>
```

Bikeshed will suggest these lines to you when there is such a conflict:

```
LINK ERROR: Multiple possible 'Navigator' idl refs.
Arbitrarily chose https://html.spec.whatwg.org/multipage/system-state.html#navigator
To auto-select one of the following refs, insert one of these lines into a <pre class=link-defaults> block:
spec:html; type:interface; text:Navigator
spec:mediacapture-streams; type:interface; text:Navigator
{{Navigator}}
```

(Note that you'll only see this conflict when building a "snapshot" spec, like a WD, rather than a "current" spec, like an ED. Since Media Capture's ED is ReSpec-on-the-client, Bikeshed can't find most/all of its definitions, so the only existing "current" definition, from HTML, wins for "current"-type specs. Only when you build for "snapshot" do we see the two definitions on equivalent footing and get the conflict.)

I suggest deleting the entire anchors block and seeing what Bikeshed actually complains about, then just fixing those terms, using a link-defaults when Bikeshed suggests such. You likely will be left with only JS terms; if any W3C specs come up blank, verify that they're in <https://github.com/tabatkins/bikeshed-data/blob/main/data/specs.json> and if not, file a bug on me to add them.

-----

> But I don't understand why, because Media Capture Streams seems to only declare a partial interface Navigator:

Unfortunately, Media Capture *does* have a definition for the Navigator interface itself; not in the IDL, but in the *heading for that section*. That's a bug in the spec's markup.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/pull/147#discussion_r640164172

Received on Wednesday, 26 May 2021 22:29:24 UTC