Module

ezraHelper

This module contains utility functions that are used through the app

View Source frontend/helpers/ezra_helper.js, line 21

Methods

# static html()

This little function gives us the possibility for html tagged template literals.

Note that if we ever introduce a library like lit we may need to remove this function, because there would otherwise be a clash in the global namespace.

proof of concept; utilizing tagged templates https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates

View Source frontend/helpers/ezra_helper.js, line 68

# static parseHTML()

This function parses string into HTML fragment

View Source frontend/helpers/ezra_helper.js, line 86

# static showErrorDialog(dialogTitle, errorMessage) → {Promise}

This function shows a modal error dialog to the user.

Parameters:
Name Type Description
dialogTitle string

The title of the dialog

errorMessage string

The message that shall be displayed

View Source frontend/helpers/ezra_helper.js, line 108

A promise that resolves when the user confirms/closes the dialog

Promise