• Save a string to a local file.

    On chrome this will instantly save the file to the downloads directory. On Safari I got a security warning the first time, then I was allowed to instantly download things.

    Chrome will get upset if you do too many downloads. Consider creating a zip file if you want to save a lot of files.

    Parameters

    • filename: string

      The preferred file name. Chrome will add (1) or similar if that filename already exists.

    • text: string

      The contents of the file.

    Returns void