跳转到内容

模板:Js doclink

来自天灾之下:危险连接资料站
wiki>Od1n2024年5月29日 (三) 13:50的版本 (Avoid trailing « # » when the link is not anchored. When the output of parser functions etc. starts with some characters, including « # », MediaWiki automatically adds a newline (see T14974), which we need to avoid here. Possible workarounds for such avoidance : « <nowiki /># », « &#35; »…)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

[1]

模板文档


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