HTML

html : object

Useful namespace for helping with html utility functions

Kind: global namespace

html.resolvePath(path, baseUrl) ⇒ string

Given the path returns an absolute path resolved so relative linking works as expected.

Kind: static method of html
Returns: string - a.href - the absolute path (or paths)

Param Type Description
path string either a relative or full path inputted to an element. This can also be a path that has items separated by ‘,’ so that you can resolve multiple items at once, since we allow users to send us multiple files that way.
baseUrl string a separate entry for if you want your url to start differently. this defaults to your window.location.origin. Additionally removes all queries from the end of the url, leaving the input as just the origin and its pathname. For ex: ‘https://example.com/images/photo.png?version=2’ becomes ‘https://example.com/images/photo.png’

html.removeUrlQueries(path, baseUrl) ⇒ string

Removes all queries from the end of the url, leaving the input as just the origin and its pathname. For ex: ‘https://example.com/images/photo.png?version=2’ becomes ‘https://example.com/images/photo.png’

Kind: static method of html
Returns: string - a.href - the absolute path

Param Type Description
path string either a relative or full path inputted to an element.
baseUrl string a separate entry for if you want your url to start differently. this defaults to your window.location.origin.