Module: inline

This module provides utilities for working with inlined content.

Source:

Methods

(static) dataUrlToBlobUrl(dataUrl) → {string}

Convert a data URL to a blob object URL. Useful for working with HTML documents that have been encoded with @rollup/plugin-url.

Parameters:
Name Type Description
dataUrl *

The data URL.

Source:
Returns:
  • A blob object URL.
Type
string

(static) dataUrlToString(dataUrl) → {string}

Extract the content from a data URL as a string, decoding it from Base64 if necessary. Useful for working with content scripts that have been encoded with @rollup/plugin-url.

Parameters:
Name Type Description
dataUrl string

The data URL.

Source:
Returns:
  • The content of the URL.
Type
string