This module contains utility functions that are used through the app
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
# static parseHTML()
This function parses string into HTML fragment
# 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 |
A promise that resolves when the user confirms/closes the dialog
Promise