respec icon indicating copy to clipboard operation
respec copied to clipboard

Disallow re-defining (via dfn) interface names when using partial interfaces

Open marcoscaceres opened this issue 4 years ago • 4 comments

Important info

  • URL to affected spec: https://w3c.github.io/mediacapture-main/

Description of problem

What happened (e.g., it crashed)?:

The mediacapture spec redefines "Navigator", which is a partial.

Expected behavior (e.g., it shouldn't crash):

We should ban (Error/refuse) the ability to redefine partial interfaces that are defined in other specs.

marcoscaceres avatar May 28 '21 04:05 marcoscaceres

That may be a nice end goal, but that does not match practice for now. There are a number of interfaces that, for various reasons, are defined in one spec and extended in other specs. This can be seen in Webref extracts in the idlnames folder. For instance, look at // Source: lines in the extracts for the following interfaces:

tidoust avatar May 28 '21 09:05 tidoust

There are a number of interfaces that, for various reasons, are defined in one spec and extended in other specs.

Extending (partial) in other specs is totally fine, but redefining <dfn>Window</dfn> should never be ok in another spec. At least, I can't think of any valid reason to do that.

marcoscaceres avatar May 28 '21 09:05 marcoscaceres

Just to be clear, https://w3c.github.io/mediacapture-main/ ended up redefining Navigator (using <dfn> even though it's a partial), which broke things.

See https://github.com/w3c/mediacapture-main/pull/793

marcoscaceres avatar May 28 '21 09:05 marcoscaceres

Related https://github.com/w3ctag/design-principles/issues/99

marcoscaceres avatar May 28 '21 09:05 marcoscaceres