Extends
Methods
-
Adds a HTML event listener and registers it for proper removal when this object gets destroyed. This method is prefered to just using
addEventListener
, which may leak event listener callbacks along with their closures.Name Type Description target
HTMLElement The target HTML element.
type
string The event type.
listener
function The listener function.
options
object optional Optional HTML event listener options.
- See:
-
- removeHtmlEventListener
-
Creates an URL for the given blob. The URL is automatically revoked on destruction of this object.
Name Type Description blob
Blob The blob to create an URL for.
Returns:
Type Description string - The URL.
-
Escapes a text string for HTML output.
This function replaces certain characters in the text string by entities (for example, "
<
" becomes "<
") so that the string may safely be output in HTML.Name Type Description text
string The text to escape.
Returns:
Type Description string The escaped text. -
Escapes a text string for literal output.
Name Type Description text
string The text to escape.
Returns:
Type Description string The escaped text. -
Removes the given HTML event listener. This is prefered to just using
removeEventListener
.Name Type Description target
HTMLElement The target HTML element.
type
string The event type.
listener
function The listener function.
options
object optional Optional HTML event listener options.
- See:
-
- addHtmlEventListener