Template:SpecName

<%
/* parameters:                                                                          */
/* $0 = name of specification                                                           */
/* $1 = anchor related to the URL (if missing, no anchor is added)                      */
/* $2 = property/entity name      (if no anchor a default title is used and $2 ignored) */

var spec   = $0;
var anchor = $1;
var name;
var url;
var title;
var result;

// REMINDER: When possible, always refer to the Editor Draft of a spec. The TR specs are always outdated

var specList = {
    'Alarm API': {
        name : 'Web Alarms API',
        url  : 'http://web-alarms.sysapps.org/',
    },
    'AmbientLight':{
        name : "Ambient Light Events",
        url  : "http://dvcs.w3.org/hg/dap/raw-file/tip/light/Overview.html"
    },
    'Battery API':{
        name : "Battery Status API",
        url  : "http://dvcs.w3.org/hg/dap/raw-file/tip/battery/Overview.html"
    },
    'Clipboard API':{
        name : "Clipboard API",
        url  : "http://dev.w3.org/2006/webapi/clipops/clipops.html"
    },
    'Compositing':{
        name : "Compositing and blending Level 1",
        url  : "http://dev.w3.org/fxtf/compositing-1/"
    },
    'Contacts':{
        name : "Contacts Manager API",
        url  : "http://contacts-manager-api.sysapps.org/"
    },
    'CSS1':{
        name : "CSS Level 1",
        url  : "http://www.w3.org/TR/CSS1/"
    },
    'CSS2.1':{
        name : "CSS Level 2 (Revision 1)",
        url  : "http://www.w3.org/TR/CSS2/"
    },
    'CSS3 Animations':{
        name : "CSS Animations",
        url  : "http://dev.w3.org/csswg/css-animations/"
    },
    'CSS3 Backgrounds':{ // Backgrounds & Borders
        name : 'CSS Backgrounds and Borders Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-background/"
    },
    'CSS3 Basic UI':{
        name : 'CSS Basic User Interface Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-ui/"
    },
    'CSS3 Box':{
        name : 'CSS Basic Box Model',
        url  : "http://dev.w3.org/csswg/css3-box/"
    },
    'CSS3 Cascade':{
        name : 'CSS Cascading and Inheritance Level 3',
        url  : "http://dev.w3.org/csswg/css-cascade/"
    },
    'CSS3 Colors':{
        name : 'CSS Color Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-color/"
    },
    'CSS3 Conditional':{
        name : 'CSS Conditional Rules Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-conditional/"
    },
    'CSS3 Content':{
        name : 'CSS Generated Content Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-content/",
    },
    'CSS3 Counter Styles':{
        name : "CSS Counter Styles Level 3",
        url  : "http://dev.w3.org/csswg/css-counter-styles-3/",
    },
    'CSS3 Device':{
        name : 'CSS Device Adaptation',
        url  : "http://dev.w3.org/csswg/css-device-adapt/",
    },
    'CSS3 Exclusions and Shapes':{
        name : 'CSS Exclusions and Shapes Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-exclusions/"
    },
    'CSS3 Flexbox':{
        name : 'CSS Flexible Box Layout Module',
        url  : "http://dev.w3.org/csswg/css3-flexbox/",
    },
    'CSS3 Fonts':{
        name : 'CSS Fonts Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-fonts/",
    },
    'CSS3 Fragmentation':{
        name : 'CSS Fragmentation Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-break/"
    },
    'CSS3 GCPM':{
        name : 'CSS Generated Content for Paged Media Module',
        url  : "http://dev.w3.org/csswg/css3-gcpm/"
    },
    'CSS3 Grid':{ /* This is 'grid layout' and no more 'grid positioning' which has been abandoned */
        name : 'CSS Grid Layout',
        url  : "http://dev.w3.org/csswg/css3-grid-layout/"
    },
    'CSS3 Images':{
        name : 'CSS Image Values and Replaced Content Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-images/"
    },
    'CSS3 Lists':{
        name : 'CSS Lists and Counters Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-lists/"
    },
    'CSS3 Media Queries':{
        name : 'Media Queries',
        url  : "http://dev.w3.org/csswg/css3-mediaqueries/"
    },
    'CSS3 Multicol':{
        name : 'CSS Multi-column Layout Module',
        url  : "http://dev.w3.org/csswg/css3-multicol/"
    },
    'CSS3 Namespaces':{
        name : 'CSS Namespaces Module',
        url  : "http://dev.w3.org/csswg/css3-namespace/"
    },
    'CSS3 Paged Media':{
        name : 'CSS Paged Media Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-page/"
    },
    'CSS3 Positioning':{
        name : 'CSS Positioned Layout Module Level 3',
        url  : "http://dev.w3.org/csswg/css-position-3/"
    },
    'CSS3 Regions':{
        name : 'CSS Regions Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-regions/"
    },
    'CSS3 Selectors':{
        name : 'Selectors Level 3',
        url  : "http://dev.w3.org/csswg/selectors3/"
    },
    'CSS3 Sizing':{
        name : 'CSS Intrinsic &amp; Extrinsic Sizing Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-sizing/"
    },
    'CSS3 Speech':{
        name : 'CSS Speech Module',
        url  : "http://dev.w3.org/csswg/css3-speech/"
    },
    'CSS3 Style':{
        name : 'CSS Style Attributes',
        url  : "http://dev.w3.org/csswg/css-style-attr/"
    },
    'CSS3 Break': {
        name : 'CSS Syntax Module Level 3',
        url  : "http://dev.w3.org/csswg/css-syntax/"
    },
    'CSS3 Template':{
        name : '??????',
        url  : "about:unknown"
    },
    'CSS3 Text':{
        name : 'CSS Text Level 3',
        url  : "http://dev.w3.org/csswg/css3-text/"
    },
    'CSS3 Text-decoration':{
        name : 'CSS Text-decoration Level 3',
        url  : "http://dev.w3.org/csswg/css-text-decor-3/"
    },
    'CSS3 Transforms':{
        name : 'CSS Transforms Level 1',
        url  : "http://dev.w3.org/csswg/css-transforms/"
    },
    'CSS3 Transitions':{
        name : 'CSS Transitions',
        url  : "http://dev.w3.org/csswg/css-transitions/"
    },
    'CSS3 Values':{
        name : 'CSS Values and Units Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-values/"
    },
    'CSS3 Variables':{
        name : 'CSS Custom Properties for Cascading Variables Module Level 1',
        url  : "http://dev.w3.org/csswg/css-variables/"
    },
    'CSS3 Writing Modes':{
        name : 'CSS Writing Modes Module Level 3',
        url  : "http://dev.w3.org/csswg/css3-writing-modes/"
    },
    'CSS4 Images':{
        name : 'CSS Image Values and Replaced Content Module Level 4',
        url  : "http://dev.w3.org/csswg/css4-images/"
    },
    'CSS4 Selectors':{
        name : 'Selectors Level 4',
        url  : "http://dev.w3.org/csswg/selectors4/"
    },
    'CSS4 Text':{
        name : 'CSS Text Level 4',
        url  : "http://dev.w3.org/csswg/css4-text/"
    },
    'CSS Masks':{
        name : 'CSS Masking Level 1',
        url  : 'https://dvcs.w3.org/hg/FXTF/raw-file/default/masking/index.html'
    },
    'CSS Will Change':{
        name : 'CSS Will Change Module Level 1',
        url  : 'http://tabatkins.github.io/specs/css-will-change/'
    },
    'CSSOM':{
        name : 'CSS Object Model (CSSOM)',
        url  : 'http://dev.w3.org/csswg/cssom/'
    },
    'CSSOM View':{
        name : 'CSS Object Model (CSSOM) View Module',
        url  : 'http://dev.w3.org/csswg/cssom-view/'
    },
    'Custom Elements':{
        name : 'Custom Elements',
        url  : 'https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html'
    },
    'Device Orientation':{
        name : 'Device Orientation Events',
        url  : 'http://dev.w3.org/geo/api/spec-source-orientation.html'
    },
    'DOM Parsing':{
        name : 'DOM Parsing and Serialization',
        url  : 'http://domparsing.spec.whatwg.org/'
    },
    'DOM WHATWG':{
        name : 'DOM',
        url  : 'http://dom.spec.whatwg.org/'
    },
    'DOM1': {
        name : 'Document Object Model (DOM) Level 1 Specification',
        url  : 'http://www.w3.org/TR/REC-DOM-Level-1/'
    },
    'DOM2 Core': {
        name : 'Document Object Model (DOM) Level 2 Core Specification',
        url  : 'http://www.w3.org/TR/DOM-Level-2-Core/'
    },
    'DOM2 Events':{
        name : 'Document Object Model (DOM) Level 2 Events Specification',
        url  : 'http://www.w3.org/TR/DOM-Level-2-Events/events.html'
    },
    'DOM2 HTML':{
        name : 'Document Object Model (DOM) Level 2 HTML Specification',
        url  : 'http://www.w3.org/TR/DOM-Level-2-HTML/'
    },
    'DOM2 Style':{
        name : 'Document Object Model (DOM) Level 2 Style Specification',
        url  : 'http://www.w3.org/TR/DOM-Level-2-Style/'
    },
    'DOM2 Traversal_Range':{
        name : 'Document Object Model (DOM) Level 2 Traversal and Range Specification',
        url  : 'http://www.w3.org/TR/DOM-Level-2-Traversal-Range/'
    },
    'DOM3 Core':{
        name : 'Document Object Model (DOM) Level 3 Core Specification',
        url  : 'http://www.w3.org/TR/DOM-Level-3-Core/'
    },
    'DOM3 Events':{
        name : 'Document Object Model (DOM) Level 3 Events Specification',
        url  : 'http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/'
    },
    'DOM3 XPath':{
        name : 'Document Object Model (DOM) Level 3 XPath Specification',
        url  : 'http://www.w3.org/TR/DOM-Level-3-XPath/'
    },
    'Element Traversal':{
        name : 'Element Traversal Specification',
        url  : 'http://www.w3.org/TR/ElementTraversal/'
    },
    'Encoding':{
        name : 'Encoding',
        url  : 'http://encoding.spec.whatwg.org/'
    },
    'ES5.1':{
        name : 'ECMAScript Language Specification 5.1th Edition (ECMA-262)',
        url  : 'http://www.ecma-international.org/ecma-262/5.1/'
    },
    'ES6':{
        name : 'ECMAScript Language Specification 6th Edition (ECMA-262)',
        url  : 'http://people.mozilla.org/~jorendorff/es6-draft.html'
    },
    'ES Int 1.0':{
        name : 'ECMAScript Internationalization API Specification 1st Edition (ECMA-402)',
        url  : 'http://www.ecma-international.org/ecma-402/1.0/'
    },
    'File API':{
        name : 'File API',
        url  : 'http://dev.w3.org/2006/webapi/FileAPI/'
    },
    'FileSystem':{
        name : 'FileSystem API',
        url  : 'http://w3c.github.io/filesystem-api/Overview.html'
    },
    'Filters 1.0':{
        name : "Filter Effects 1.0",
        url  : "http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html"
    },
    'Fullscreen':{
        name : 'Fullscreen API',
        url  : 'http://fullscreen.spec.whatwg.org/'
    },
    'Gamepad':{
        name : 'Gamepad',
        url  : 'https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html'
    },
    'Geolocation': {
        name : 'Geolocation API',
        url  : 'http://www.w3.org/TR/geolocation-API/'
    },
    'Geometry Interfaces': {
        name : 'Geometry Interfaces Module Level 1',
        url  : 'http://dev.w3.org/fxtf/geometry/Overview.html'
    },
    'Harmony':{
        name :"EcmaScript Language Specification Draft 6th Edition",
        url : "http://wiki.ecmascript.org/lib/exe/fetch.php?id=harmony%3Aspecification_drafts&cache=cache&media=harmony:working_draft_ecma-262_edition_6_11-08-13-nomarkup.pdf"
    },
    'Highres Time':{
        name : 'High Resolution Time',
        url  : 'http://www.w3.org/TR/hr-time/'
    },
    'HTML Canvas 2D Context W3C': {
        name : 'HTML Canvas 2D Context (W3C)',
        url  : 'http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/'
    },
    'HTML Editing': {
        name : 'HTML Editing APIs',
        url  : 'https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html'
    },
    'HTML Templates': {
        name : 'HTML Templates',
        url  : 'https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html'
    },
    'HTML4.01':{
        name : 'HTML 4.01 Specification',
        url  : 'http://www.w3.org/TR/html401/'
    },
    'HTML5 Web Messaging':{
        name : 'HTML5 Web Messaging',
        url  : 'http://dev.w3.org/html5/postmsg/'
    },
    'HTML5 W3C':{
        name : 'HTML5',
        url  : 'http://www.w3.org/TR/html5/'
    },
    'HTML5.1':{
        name : 'HTML5.1 (draft)',
        url  : 'http://www.w3.org/html/wg/drafts/html/master/'
    },
    'HTML WHATWG':{
        name : 'WHATWG HTML Living Standard',
        url  : 'http://www.whatwg.org/specs/web-apps/current-work/multipage/'
    },
    'IndexedDB':{
        name : 'Indexed Database API',
        url  : 'https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html'
    },
    'MathML2':{
        name : 'MathML 2.0',
        url : 'http://www.w3.org/TR/MathML2/'
    },
    'MathML3':{
        name : 'MathML 3.0',
        url : 'http://www.w3.org/TR/MathML3/'
    },
    'Media Capture':{
        name : 'Media Capture and Streams',
        url  : 'http://dev.w3.org/2011/webrtc/editor/getusermedia.html'
    },
    'Media Source Extensions':{
        name : 'Media Source Extensions',
        url  : 'https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html'
    },
    'MediaStream Recording':{
        name : 'MediaStream Recording',
        url  : 'https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html'
    },
    'Messaging':{
        name : 'Messaging API',
        url  : 'http://www.w3.org/2012/sysapps/messaging/'
    },
    'Navigation Timing':{
        name : 'Navigation Timing',
        url  : 'http://www.w3.org/TR/2012/REC-navigation-timing-20121217/'
    },
    'Network Information':{
        name : 'Network Information API',
        url  : 'https://dvcs.w3.org/hg/dap/raw-file/tip/network-api/Overview.html'
    },
    'Page Visibility API':{
        name : 'Page Visibility API',
        url  : 'http://www.w3.org/TR/page-visibility/'
    },
    'Pointer Events': {
        name : 'Pointer Events',
        url  : 'https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.html'
    },
    'Pointer Lock':{
        name : 'Pointer Lock',
        url  : 'https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html'
    },
    'Progress Events':{
        name : 'Progress Events',
        url  : 'https://dvcs.w3.org/hg/progress/raw-file/tip/Overview.html'
    },
    'Proximity Events':{
        name : 'Proximity Events',
        url  : 'http://dvcs.w3.org/hg/dap/raw-file/tip/proximity/Overview.html'
    },
    'Push API':{
        name : 'Push API',
        url  : 'https://dvcs.w3.org/hg/push/raw-file/default/index.html'
    },
    'RequestAnimationFrame':{
        name : 'Timing control for script-based animations',
        url  : 'http://w3c-test.org/webperf/specs/RequestAnimationFrame/'
    },
    'Screen Orientation':{
        name : 'Screen Orientation API',
        url  : 'https://dvcs.w3.org/hg/screen-orientation/raw-file/tip/Overview.html'
    },
    'Server-sent events':{
        name : 'Server-Sent Events',
        url  : 'http://dev.w3.org/html5/eventsource/'
    },
    'Selectors API Level 1':{
        name : 'Selectors API Level 1',
        url  : 'http://dev.w3.org/2006/webapi/selectors-api/'
    },
    'Selectors API Level 2':{
        name : 'Selectors API Level 2',
        url  : 'http://dev.w3.org/2006/webapi/selectors-api2/'
    },
    'Shadow DOM':{
        name : 'Shadow DOM',
        url  : 'https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html'
    },
    'SVG1.1':{
        name : 'Scalable Vector Graphics (SVG) 1.1 (Second Edition)',
        url  : 'http://www.w3.org/TR/SVG11/'
    },
    'Telephony API':{
        name : 'Web Telephony API',
        url  : 'http://telephony.sysapps.org/'
    },
    'Touch Events':{
        name : 'Touch Events version 1',
        url  : 'https://dvcs.w3.org/hg/webevents/raw-file/v1/touchevents.html'
    },
    'Typed Array':{
        name : 'Typed Array Specification',
        url  : 'http://www.khronos.org/registry/typedarray/specs/latest/'
    },
    'UI Events':{
        name : 'UI Events',
        url  : 'https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm'
    },
    'Undo Manager':{
        name : 'UndoManager and DOMTransaction',
        url  : 'https://dvcs.w3.org/hg/undomanager/raw-file/tip/undomanager.html'
    },
    'URL':{
        name : 'URL',
        url  : 'http://url.spec.whatwg.org/'
    },
    'vCard':{
        name : 'vCard Format Specification',
        url  : 'http://tools.ietf.org/html/rfc6350'
    },
    'Vibration API':{
        name : 'Vibration API',
        url  : 'http://www.w3.org/TR/vibration/'
    },
    'Web Audio API':{
        name : 'Web Audio API',
        url  : 'https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html'
    },
    'Web Crypto API':{
        name : 'Web Cryptography API',
        url  : 'https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html'
    },
    'WebIDL':{
        name : 'Web IDL (Second Edition)',
        url  : 'http://dev.w3.org/2006/webapi/WebIDL/'
    },
    'Web Notifications':{
        name : 'Web Notifications',
        url  : 'https://dvcs.w3.org/hg/notifications/raw-file/tip/Overview.html'
    },
    'WebRTC 1.0':{
        name : 'WebRTC 1.0: Real-time Communication Between Browser',
        url  : 'http://dev.w3.org/2011/webrtc/editor/webrtc.html'
    },
    'Websockets':{
        name : 'The WebSocket API',
        url  : 'http://dev.w3.org/html5/websockets/'
    },
    'Web Storage':{
        name : 'Web Storage',
        url  : 'http://dev.w3.org/html5/webstorage/'
    },
    'Web Telephony':{
        name : 'Web Telephony API',
        url  : 'http://www.w3.org/2012/sysapps/telephony/'
    },
    'WebVTT':{
        name : 'WebVTT: The Web Video Text Tracks Format',
        url  : 'http://dev.w3.org/html5/webvtt/'
    },
    'Web Workers':{
        name : 'Web Workers',
        url  : 'http://dev.w3.org/html5/workers/'
    },
    'WOFF1.0':{
        name : 'WOFF File Format 1.0',
        url  : 'http://www.w3.org/TR/WOFF/'
    },
    'XMLHttpRequest':{
        name : 'XMLHttpRequest',
        url  : 'https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html'
    }
}

specList['Compositing'] = specList['Blending'];
specList['CSS3 2D Transforms'] = specList['CSS3 3D Transforms'] = specList['CSS3 Transforms'];
specList['CSS3 Break'] = specList['CSS3 Fragmentation'];
specList['CSS3 UI'] = specList['CSS3 Basic UI'];
specList['WebSMS'] = specList['Messaging'];

name = specList[spec] && specList[spec].name || 'Unknown';
url  = specList[spec] && specList[spec].url  || 'about:unknown';

if ($2) {
	title = mdn.localString({
		"en-US": "The definition of '" + $2 + "' in that specification.",
		"fr": "La définition de '" + $2 + "' dans cette spécification.",
		"de": "Die Definition von '" + $2 + "' in dieser Spezifikation."
	});	
} else {
	title = mdn.localString({
		"en-US": "The '" + name + "' specification",
		"fr": "La spécificaction '" + name + "'",
		"de": "Die '" + name + "' Spezifikation"
	});	
}

result = '<a href="' + url + anchor + '" lang="en" class="external" title="' + title + '">' + name + "</a>";


%><%- result %>
Search for pages that use Template:SpecName to see example use cases and how many pages use this macro.

Document Tags and Contributors

Tags:
Contributors to this page: Sheppy, fscholz, Jeremie, ethertank, trevorh, teoli, mnoorenberghe, FredB, SJW
Last updated by: teoli,