Methods
-
getLink(relation)
-
Return the reference to the specified related linked document. The method returns an empty string for missing meta information (to make the returned value React-friendly).
Parameters:
Name Type Description relation
string The relation of the link target to the current page.
Returns:
The reference to the location of the related document, e.g. a URL.
- Type
- string
-
getLinks()
-
Returns the relations of the currently set related documents linked to the current page.
Returns:
- Type
- Array.<string>
-
getMetaName(name)
-
Returns the value of the specified named meta information property. The method returns an empty string for missing meta information (to make the returned value React-friendly).
Parameters:
Name Type Description name
string The name of the named meta information property.
Returns:
The value of the generic meta information, or an empty string.
- Type
- string
-
getMetaNames()
-
Returns the names of the currently specified named meta information properties.
Returns:
The names of the currently specified named meta information properties.
- Type
- Array.<string>
-
getMetaProperties()
-
Returns the names of the currently specified specialized meta information properties.
Returns:
The names of the currently specified specialized meta information properties.
- Type
- Array.<string>
-
getMetaProperty(name)
-
Returns the value of the specified specialized meta information property. The method returns an empty string for missing meta information (to make the returned value React-friendly).
Parameters:
Name Type Description name
string The name of the specialized meta information property.
Returns:
The value of the specified meta information, or an empty string.
- Type
- string
-
getTitle()
-
Returns the page title. The method returns an empty string if no page title has been set yet.
Note that the page title is cached internally by the meta manager and may therefore differ from the current document title if it has been modified by a 3rd party code.
Returns:
The current page title.
- Type
- string
-
setLink(relation, reference)
-
Sets the specified specialized link information.
Parameters:
Name Type Description relation
string The relation of the link target to the current page.
reference
string The reference to the location of the related document, e.g. a URL.
-
setMetaName(name, value)
-
Set the specified named meta information property.
Parameters:
Name Type Description name
string Meta information property name, for example
keywords
.value
string The meta information value.
-
setMetaProperty(name, value)
-
Sets the specified specialized meta information property.
Parameters:
Name Type Description name
string Name of the specialized meta information property.
value
string The value of the meta information property.
-
setTitle(title)
-
Sets the page title.
Parameters:
Name Type Description title
string The new page title.