@@ -190,10 +190,12 @@ class Translations extends Base {
...
@@ -190,10 +190,12 @@ class Translations extends Base {
/**
/**
* Returns the translations for the current document.
* Returns the translations for the current document.
*
*
* @param element
* @param {HTMLElement|undefined} [element] - Element to search for translations. Default: element with objectlink @schukai/monster/i18n/translations@@link.
* @returns {*}
* @returns {Translations}
* @throws {Error} Element is not an HTMLElement
* @throws {Error} Element is not an HTMLElement.
* @throws {Error} Missing translations
* @throws {Error} Cannot find element with translations. Add a translations object to the document.
* @throws {Error} This element has no translations.
* @throws {Error} Missing translations.
*/
*/
functiongetDocumentTranslations(element){
functiongetDocumentTranslations(element){
...
@@ -201,14 +203,17 @@ function getDocumentTranslations(element) {
...
@@ -201,14 +203,17 @@ function getDocumentTranslations(element) {