From fdf66a21f1a330595f7345f3b0024e0e7cafa28a Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 19 May 2021 15:53:04 +0200 Subject: [HTML5] Add easy to use download API. New `JavaScript.download_buffer` method to create a prompt that let the user download a file. --- doc/classes/JavaScript.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index e6d74eeb21..c87e637ff5 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -29,6 +29,22 @@ Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage. + + + + + + + + + + + Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type. + [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension. + [b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click). + [b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession. + + -- cgit v1.2.3