Methods
fromElement(el, config) → {mw.Title|null
}static
#
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 |
Returns:
- Type
-
mw.Title
|
null
getTitle(href, config) → {string|undefined
}static
#
undefined
}static
#
isValid(title, contentNamespaces) → {mw.Title|null
}static
#
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 |
Returns:
- Type
-
mw.Title
|
null
isOwnPageAnchorLink(el) → {boolean}inner
#
Fast, native check if we are parsing a self-link, with the only difference beeing the hash.
Parameters:
Name | Type | Description |
---|---|---|
el |
HTMLAnchorElement |
Returns:
- Type
- boolean