-
-
Notifications
You must be signed in to change notification settings - Fork 393
caniuse
Marcos Cáceres edited this page May 3, 2018
·
15 revisions
Adds a Can I Use support table in header (before the copyright message).
// basic example
var respecConfig = {
caniuse: "payment-request",
};
// example with configuration (see options below)
var respecConfig = {
caniuse: {
feature: "payment-request",
browsers: ["chrome", "safari"],
},
};
Note: This feature is only available in "live" Editor's Drafts. Because this feature relies on JavaScript, it's not exported out when a document is saved as HTML. In exported document, we replace the table with a link to caniuse.com.
It renders as:
feature
- (required) Can I Use feature key
browsers
- Array of browsers to show support for.
Default:["chrome", "firefox", "safari", "edge"]
Supported Values:-
chrome
-- Chrome -
firefox
-- Firefox -
ie
-- IE -
edge
-- Edge -
android
-- Android -
safari
-- Safari -
opera
-- Opera -
bb
-- Blackberry -
and_uc
-- UC (Android) -
and_ff
-- Firefox (Android)
-
versions
- Number of browser versions to show
Default:4
maxAge
- Cache duration (in ms).
Set to0
to get fresh data each on each request.
Default:86400000
// 24 hours apiURL
- (For testing) Use a custom URL that returns a JSON response with
stats
key as the browser data object.
Use{FEATURE}
as placeholder in URL to replace it by a value ofcaniuse.feature
💖 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