-
-
Notifications
You must be signed in to change notification settings - Fork 389
data link for
Sid Vishnoi edited this page Jul 8, 2020
·
7 revisions
The data-link-for
attribute allows you to link to a definition with same data-dfn-for
value.
<p>
<dfn>bar</dfn> is a global definition.
<a>bar</a> links to bar.
Prefer using [= bar =] syntax for linking.
</p>
<p>
<dfn data-dfn-for="Foo">bar</dfn> is defined in scope of "Foo".
<a data-link-for="Foo" data-link-type="dfn">bar</a> links to `bar` in scope of `Foo`.
Following syntax is preferred: [= Foo/bar =]
</p>
It works with IDL definitions also:
<p>
<dfn data-dfn-type="idl" data-dfn-for="Foo">bar</dfn> is defined in scope of "Foo".
<a data-link-for="Foo" data-link-type="idl">bar</a> links to `bar` in scope of `Foo`.
Following syntax is preferred: {{ Foo/bar }}
</p>
The data-link-for
attribute also allows you to link to one or more aspects of an interface at once.
In this example, we link to Request
's definition of url, but not Response
's.
<pre class="idl">
interface Request {
readonly attribute USVString url;
};
interface Response {
readonly attribute USVString url;
};
</pre>
<p data-dfn-for="Request">
The <dfn data-lt="clone()">clone</dfn> method.
The <dfn>url</dfn> attribute.
</p>
<!-- Linking to definitions works the same -->
<p data-link-for="Request">
Links to <a>clone()</a> method.
Links to the <a>url</a> attribute.
</p>
💖 Support ReSpec by becoming a sponsor via Open Collective. 💖
✨ View rendered version of this documentation at https://respec.org/docs/ ✨
- addSectionLinks
- authors
- caniuse
- edDraftURI
- editors
- favicon
- format (markdown)
- formerEditors
- github
- highlightVars
- isPreview
- license
- lint
- localBiblio
- logos
- maxTocLevel
- mdn
- modificationDate
- noTOC
- otherLinks
- pluralize
- postProcess
- preProcess
- previousDiffURI
- previousMaturity
- previousPublishDate
- prevRecShortname
- prevRecURI
-
processVersion(Deprecated) - publishDate
-
refNote(Deprecated) - shortName
- specStatus
- subjectPrefix
- subtitle
- testSuiteURI
- xref
- additionalCopyrightHolders
-
addPatentNote(Deprecated) - alternateFormats
- canonicalURI
- charterDisclosureURI
- copyrightStart
- crEnd
-
darkMode(deprecated, use dark mode) - doJsonLd
- errata
- group
- implementationReportURI
- lcEnd
- level
- noRecTrack
- prevED
- submissionCommentNumber
-
wg(Deprecated) -
wgId(Deprecated) -
wgPatentPolicy(Deprecated) -
wgPatentURI(Deprecated) - wgPublicList
-
wgURI(Deprecated)
a11y
check-punctuation
local-refs-exist
no-headingless-sections
no-http-props
no-unused-vars
no-unused-dfns
informative-dfn
privsec-section
wpt-tests-exist
Handled by ReSpec for you.
- data-abbr
-
data-cite(Not recommended) - data-dfn-for
- data-dfn-type
- data-format
- data-include-format
- data-include-replace
- data-include
- data-link-for
- data-link-type
- data-local-lt
- data-lt-no-plural
- data-lt-noDefault
- data-lt
- data-number
- data-oninclude
- data-sort
- data-tests
-
data-transform(Deprecated) - data-type
- dir
- lang