Add support for firefox
This commit is contained in:
parent
7cd3f51c56
commit
0ee290648a
3 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,7 @@ import { Room } from "matrix-js-sdk/src/models/room";
|
|||
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||
import { getUserNameColorClass } from "../FormattingUtils";
|
||||
import { Exporter } from "./Exporter";
|
||||
import * as ponyfill from 'web-streams-polyfill/ponyfill'
|
||||
|
||||
const css = `
|
||||
body {
|
||||
|
@ -485,6 +486,8 @@ export default class HTMLExporter extends Exporter {
|
|||
//Generate the zip file asynchronously
|
||||
const blob = await this.zip.generateAsync({ type: "blob" });
|
||||
|
||||
//Support for firefox browser
|
||||
streamSaver.WritableStream = ponyfill.WritableStream
|
||||
//Create a writable stream to the directory
|
||||
const fileStream = streamSaver.createWriteStream(filename, { size: blob.size });
|
||||
const writer = fileStream.getWriter();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue