-
-
Notifications
You must be signed in to change notification settings - Fork 419
data link for
Sid Vishnoi edited this page May 21, 2020
·
8 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 =]
</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/ ✨
- Getting Started
- How Do I…
- Spec Editor's Guide
- Writing Algorithms
- WebIDL Guide
- Configuring ReSpec
- Developers Guide
- Shorthands
- addSectionLinks
- authors
- caniuse
- edDraftURI
- editors
- format (markdown)
- formerEditors
- github
- highlightVars
- isPreview
- license
- lint
- localBiblio
- logos
- maxTocLevel
- mdn
- modificationDate
- monetization
- noTOC
- otherLinks
- pluralize
- postProcess
- preProcess
- previousDiffURI
- previousMaturity
- previousPublishDate
- prevRecShortname
- prevRecURI
-
processVersion(Removed) - publishDate
- shortName
- specStatus
- subjectPrefix
- subtitle
- testSuiteURI
- xref
- additionalCopyrightHolders
-
addPatentNote(Removed) - alternateFormats
- canonicalURI
- charterDisclosureURI
- copyrightStart
- crEnd
- dark mode
- doJsonLd
- errata
- group
- implementationReportURI
- level
- noRecTrack
- prevED
- prEnd
- submissionCommentNumber
-
wg(Deprecated — usegroup) -
wgId(Deprecated — usegroup) -
wgPatentURI(Deprecated — usegroup) -
wgPublicList(Deprecated — usegroup) -
wgURI(Deprecated — usegroup)
a11ycheck-charsetcheck-internal-slotscheck-punctuationinformative-dfnlocal-refs-existno-captionless-tablesno-headingless-sectionsno-http-propsno-link-warningsno-unused-dfnsno-unused-varsprivsec-sectionwpt-tests-exist
Handled by ReSpec for you.
- conformance
- idl-index
- index
- issue-summary
- references
- tof (Table of Figures)
- data-abbr
- data-cite
- data-dfn-for
- data-dfn-type
- data-export
- data-format
- data-include
- data-include-format
- data-include-replace
- data-link-for
- data-link-type
- data-local-lt
- data-lt
- data-lt-no-plural
- data-lt-noDefault
- data-max-toc
- data-number
- data-oninclude
- data-sort
- data-tests
-
data-transform(Deprecated) - data-type
- dir
- lang