跳转到内容

模板:Js doclink/doc

来自天灾之下:危险连接资料站
wiki>Pppery2025年6月17日 (二) 12:52的版本 (Reverted edits by حامد775535854 (talk) to last version by SWilson (WMF))
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

This template creates a link to MediaWiki Core's auto-generated Javascript API documentation at https://doc.wikimedia.org/mediawiki-core/master/js/

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

Link to API documentation at docs.wikimedia.org

模板参数

此模板首选参数不换行的行内格式。

参数描述类型状态
11

无描述

字符串必需
JS class nameclass

无描述

示例值
mw.user
字符串可选
JS method namemethod

无描述

示例值
getId
字符串可选
Link texttext

无描述

字符串可选

See also