Try Install Learn Blog API Packages GitHub
Pages

Url

Utility functions for working with Url

Functions

createObjectUrlFromFile
(
file
:
File
)
:
String

Creates an url from the given file, which is available until the current window is closed.

File.fromString("Content", "test.html", "text/html")
|> Url.createObjectUrlFromFile()
createObjectUrlFromString
(
string
:
String
type
:
String
)
:
String

Creates an url from the given content and type, which is available until the current window is closed.

Url.createObjectUrlFromString("Content", "text/html")
parse
(
url
:
String
)
:
Url

Parses the given string as an Url.

revokeObjectUrl
(
url
:
String
)
:
Void

Releases an existing object URL which was previously created.

Url.createObjectUrlFromString("Content", "text/html")
|> Url.revokeObjectUrl()