workAroundFirefoxNotLoadingStylesheetStyles = function (
        doc,
        url,
        options
    ) {
        var d = document.implementation.createHTMLDocument("");
        d.replaceChild(doc.documentElement, d.documentElement);

        var extendedOptions = options ? util.clone(options) : {};

        if (!options.baseUrl) {
            extendedOptions.baseUrl = url;
        }

        return {
            document: d,
            options: extendedOptions,
        };
    }
Draws a HTML string to the canvas.
rasterizeHTML.drawHTML( html [, canvas] [, options] ).then(function (result) { ... });