data dfn type - speced/respec GitHub Wiki
Applies to: <dfn>
Declares the type of a definition. Used by the xref system to enable type-specific linking with [= =], {{ }}, and data-link-type.
In most cases you do not need this attribute — ReSpec infers the type automatically. IDL types (interface, method, attribute, etc.) are set automatically when a <dfn> is inside a <pre class="idl"> block.
<p>To <dfn data-dfn-type="abstract-op">process a widget</dfn>, run these steps:</p><p>The <dfn data-dfn-type="http-header">Widget-Policy</dfn> response header...</p>| Value | Use for |
|---|---|
dfn |
General concepts and prose definitions (default when no type is set) |
abstract-op |
Abstract operations (algorithm steps) |
element |
HTML/SVG/MathML element names |
element-attr |
Content attributes of HTML/SVG elements |
attr-value |
Values of element attributes |
element-state |
States of elements (e.g. checkbox states) |
event |
DOM event types |
http-header |
HTTP header names |
media-type |
MIME types |
scheme |
URL schemes |
permission |
Permission strings (e.g. for the Permissions API) |
When <dfn> elements are inside a <pre class="idl"> WebIDL block, ReSpec automatically sets the dfn type from the IDL declaration. You don't set these manually:
interface, attribute, method, dictionary, dict-member, enum, enum-value, callback, typedef, namespace, constructor
- The
[= term =]shorthand links todfnorabstract-optype definitions - The
{{ term }}shorthand links to IDL type definitions - When
data-dfn-foris set, type defaults to IDL unless explicitly overridden - If unsure, omit
data-dfn-typeand let ReSpec infer it