@ima/core
Version:
IMA.js framework for isomorphic javascript application
153 lines (152 loc) • 4.54 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "MetaManager", {
enumerable: true,
get: function() {
return MetaManager;
}
});
class MetaManager {
/**
* Sets the page title.
*
* @param title The new page title.
*/ setTitle(title) {
return this;
}
/**
* 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.
*
* @return The current page title.
*/ getTitle() {
return '';
}
/**
* Set the specified named meta information property.
*
* @param name Meta information property name, for example
* `keywords`.
* @param content The meta information content.
* @parram attr Additional optional meta attributes.
*/ setMetaName(name, content, attr) {
return this;
}
/**
* 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).
*
* @param name The name of the named meta information property.
* @return The value of the generic meta information, or an empty string.
*/ getMetaName(name) {
return {
content: ''
};
}
/**
* Returns the names of the currently specified named meta information
* properties.
*
* @return The names of the currently specified named meta
* information properties.
*/ getMetaNames() {
return [];
}
/**
* Return [key, value] pairs of named meta information.
*
* @return [key, value] pairs of named meta information.
*/ getMetaNamesIterator() {
return [];
}
/**
* Sets the specified specialized meta information property.
*
* @param name Name of the specialized meta information property.
* @param property The value of the meta information property.
* @parram attr Additional optional meta attributes.
*/ setMetaProperty(property, content, attr) {
return this;
}
/**
* 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).
*
* @param name The name of the specialized meta information
* property.
* @return The value of the specified meta information, or an
* empty string.
*/ getMetaProperty(property) {
return {
content: ''
};
}
/**
* Returns the names of the currently specified specialized meta
* information properties.
*
* @return The names of the currently specified specialized meta
* information properties.
*/ getMetaProperties() {
return [];
}
/**
* Return [key, value] pairs of meta information properties.
*
* @return [key, value] pairs of meta information properties.
*/ getMetaPropertiesIterator() {
return [];
}
/**
* Sets the specified specialized link information.
*
* @param relation The relation of the link target to the current
* page.
* @param href The reference to the location of the related
* document, e.g. a URL.
* @parram attr Additional optional link attributes.
*/ setLink(relation, href, attr) {
return this;
}
/**
* 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).
*
* @param relation The relation of the link target to the current
* page.
* @return The reference to the location of the related document,
* e.g. a URL.
*/ getLink(relation) {
return {
href: ''
};
}
/**
* Returns the relations of the currently set related documents linked to
* the current page.
*/ getLinks() {
return [];
}
/**
* Return [key, value] pairs of currently set links.
*
* @return [key, value] pairs of currently set links.
*/ getLinksIterator() {
return [];
}
/**
* Resets the stored meta names, properties and links.
*/ clearMetaAttributes() {
return;
}
}
//# sourceMappingURL=MetaManager.js.map
;