diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-05-19 15:53:04 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-05-21 15:31:23 +0200 |
commit | fdf66a21f1a330595f7345f3b0024e0e7cafa28a (patch) | |
tree | 4d7e4cc526f209065baba845a0e3ab15d8e99f7c /platform/javascript/api/javascript_singleton.h | |
parent | 8c2beeea907cb39baac20df198392ae4fdf64029 (diff) |
[HTML5] Add easy to use download API.
New `JavaScript.download_buffer` method to create a prompt that let the
user download a file.
Diffstat (limited to 'platform/javascript/api/javascript_singleton.h')
-rw-r--r-- | platform/javascript/api/javascript_singleton.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/javascript/api/javascript_singleton.h b/platform/javascript/api/javascript_singleton.h index 45e9950acb..1615efa87e 100644 --- a/platform/javascript/api/javascript_singleton.h +++ b/platform/javascript/api/javascript_singleton.h @@ -58,6 +58,7 @@ public: Ref<JavaScriptObject> get_interface(const String &p_interface); Ref<JavaScriptObject> create_callback(const Callable &p_callable); Variant _create_object_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error); + void download_buffer(Vector<uint8_t> p_arr, const String &p_name, const String &p_mime = "application/octet-stream"); static JavaScript *get_singleton(); JavaScript(); |