title

Methods

fromElement(el, config) → {mw.Title|null}static #

Return an mw.Title from an HTMLAnchorElement if valid for page previews. Convenience method

Parameters:

Name Type Description
el HTMLAnchorElement
config mw.Map
Source:

Returns:

Type
mw.Title | null

getTitle(href, config) → {string|undefined}static #

Gets the title of a local page from an href given some configuration.

Parameters:

Name Type Description
href string
config mw.Map
Source:

Returns:

Type
string | undefined

isValid(title, contentNamespaces) → {mw.Title|null}static #

Given a page title it will return the mediawiki.Title if it is an eligible link for showing page previews, null otherwise

Parameters:

Name Type Description
title string | undefined

page title to check if it should show preview

contentNamespaces Array.<number>

contentNamespaces as specified in wgContentNamespaces

Source:

Returns:

Type
mw.Title | null