W3C home > Mailing lists > Public > spec-prod@w3.org > October to December 2016

RE: bikeshed fatal error on 'interface' dfn using 'for' attribute

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Fri, 11 Nov 2016 01:07:52 +0000
To: "Hodges, Jeff" <jeff.hodges@paypal.com>, Tab Atkins Jr. <jackalmage@gmail.com>
CC: "spec-prod@w3.org" <spec-prod@w3.org>, Arron Eicholz <arronei@microsoft.com>
Message-ID: <BLUPR0301MB211343EC45221C2F9CDE1D58F8BB0@BLUPR0301MB2113.namprd03.prod.outlook.com>
Funny, this hit the W3C HTML spec as well. My case was: https://github.com/travisleithead/html/commit/b59f37a5056dfa1875328d428bcc1ca49d198f53#diff-eb18865acfd94500fe999f8128227ed6
 (in response to https://github.com/w3c/html/issues/707) 

Where an ancestor dfn-for='....' was inheriting down to a <dfn element>...<dfn>. However, it _is_ legitimate for an element to have a for attribute, so I don't see the problem? In the above commit, I fix the issue by moving the ancestor definition to locally-needed terms, but I don't think I should have to do that...

-----Original Message-----
From: Hodges, Jeff [mailto:jeff.hodges@paypal.com] 
Sent: Monday, November 7, 2016 4:43 PM
To: Tab Atkins Jr. <jackalmage@gmail.com>
Cc: spec-prod@w3.org
Subject: Re: bikeshed fatal error on 'interface' dfn using 'for' attribute

On 11/7/16, 4:24 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Mon, Nov 7, 2016 at 4:19 PM, Hodges, Jeff <jeff.hodges@paypal.com>
>wrote:
>> oops, s/<dif/<div/g in the below...
>>
>> On 11/7/16, 3:34 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>>Yup, it's some new mistake-catching I put in recently.  The error 
>>>message should be fairly self-explanatory - you probably have an 
>>>ancestor specifying `dfn-for=Transport` that's accidentally applying 
>>>to the IDL block.
>>
>> ok, what you are saying (?) is that we should not be using the 
>> pattern of...
>>
>> <!-- begin -->
>> ## foo (interface <dfn interface>foo</dfn>) ## {#iface-foo}
>>
>> <pre class="idl">
>>   [SecureContext]
>>   interface foo {
>>     readonly    attribute USVString     bar;
>>   };
>> </pre>
>>
>> <div dfn-for="foo">
>>   The <dfn>bar</dfn> member specifies...
>> </div>
>> <!-- end -->
>>
>>
>> ..and we should get rid of all such `<div dfn-for="...">` blocks ?
>>
>> i.e., the `<div dfn-for="...">` is the "ancestor" applying to the IDL 
>> block?
>
>No, I meant "ancestor" in the normal, DOM meaning of the term.  Read 
>the error message again - it's the *interface* definition that's 
>causing trouble, because you're somehow declaring that it's for 
>"Transport".  Find where in your document the `dfn-for=Transport` is, 
>and move it to a container that just encloses the definitions you 
>actually want it to apply to.  (This happens a lot if you forgot to 
>close a <div> somewhere earlier in your document.)

thanks. had actually neglected to properly close the <div> that the `dfn-for=Transport` was on.

=JeffH
Received on Friday, 11 November 2016 01:08:30 UTC

This archive was generated by hypermail 2.3.1 : Friday, 11 November 2016 01:08:32 UTC