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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 7 Nov 2016 16:24:43 -0800
Message-ID: <CAAWBYDBx4RRBFmbpXh4r-eXdrOJCd_N_JtY3ZnfoMUXUohpU7A@mail.gmail.com>
To: "Hodges, Jeff" <jeff.hodges@paypal.com>
Cc: "spec-prod@w3.org" <spec-prod@w3.org>
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.)

~TJ
Received on Tuesday, 8 November 2016 00:25:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 8 November 2016 00:25:36 UTC