Constructor
new ve.dm.MWMagicLinkType(type, rel, content)private
#
Encapsulation of a particular magic link type.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The type of magic link; one of |
rel |
string | The value of the link's "rel" attribute.
Either |
content |
string | The content of the magic link. |
Encapsulation of a particular magic link type.
Methods
getAnnotation()
#
getCode()protected
#
matchHref(href) → {boolean}
#
Return true if the given href is appropriate for this magic link.
Parameters:
Name | Type | Description |
---|---|---|
href |
string |
Returns:
- Type
- boolean
Return true if the given href is appropriate for this magic link.
fromContent(content) → {ve.dm.MWMagicLinkType|null
}static
#
null
}static
#
Return the subclass of ve.dm.MWMagicLinkType
appropriate for the given content, or null
if the content
is not appropriate for a magic link.
Parameters:
Name | Type | Description |
---|---|---|
content |
string |
Returns:
- Type
-
ve.dm.MWMagicLinkType
|
null
Return the subclass of ve.dm.MWMagicLinkType
appropriate for the given content, or null
if the content
is not appropriate for a magic link.