Template:Js doclink

From Linux Web Expert

[1]

Template documentation


This template creates a link to the auto-generated Javascript API documentation at https://doc.wikimedia.org/

Usage

Link to a class or method, with optional custom link text.

{{js doclink|mw.user}}mw.user

{{js doclink|mw.user|text=a widget}}a widget

{{js doclink|mw.user|method=getId}}mw.user.getId()

{{js doclink|mw.user|method=getId|text=some method}}some method

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools.

Js doclink

<templatedata> { "params": { "1": { "type": "string", "required": true }, "class": { "label": "JS class name", "example": "mw.user", "type": "string" }, "method": { "label": "JS method name", "example": "getId", "type": "string" }, "text": { "label": "Link text", "type": "string" } }, "description": "Link to API documentation at docs.wikimedia.org", "paramOrder": [ "1", "class", "method", "text" ], "format": "inline" } </templatedata>

See also