data dfn for - speced/respec GitHub Wiki
Applies to: <dfn>, <section>, <a>
Sets the context (scope) for a definition or link — typically the name of the IDL interface, dictionary, or element that a member belongs to. Also used on <section> to set the default context for all definitions and links within.
<section data-dfn-for="Request" data-link-for="Request">
<h2><code>Request</code> interface</h2>
<pre class="idl">
interface Request {
readonly attribute USVString method;
Promise<Response> clone();
};
</pre>
<p>The <dfn>Request</dfn> interface represents a resource request.</p>
<p>The <dfn>method</dfn> attribute returns the request method.</p>
<p>The <dfn>clone()</dfn> method returns a copy of the request.</p>
</section><dfn data-dfn-for="Request">method</dfn>
<dfn data-dfn-for="Response">type</dfn>- Set
data-dfn-foron a<section>to apply the context to all<dfn>elements within that section (avoids repeating it on every dfn) - Use
data-link-forto set the default context for links within a section - Required when two different interfaces have members with the same name — disambiguates which one you're defining
- WebIDL members inside
<pre class="idl">automatically getdata-dfn-forset from their parent interface; you only need this for the prose dfns