[HTML5] Implement JavaScript PWA update callbacks.

Allows detecting when a new version of the progressive web app service
worker is waiting (i.e. an update is pending), along a function to force
the update and reload all clients.
This commit is contained in:
Fabio Alessandrelli 2022-01-31 15:28:12 +01:00
parent afdfe7c03b
commit 4c23a902c1
8 changed files with 118 additions and 0 deletions

View file

@ -59,6 +59,8 @@ public:
Ref<JavaScriptObject> create_callback(Object *p_ref, const StringName &p_method);
Variant _create_object_bind(const Variant **p_args, int p_argcount, Variant::CallError &r_error);
void download_buffer(Vector<uint8_t> p_arr, const String &p_name, const String &p_mime = "application/octet-stream");
bool pwa_needs_update() const;
Error pwa_update();
static JavaScript *get_singleton();
JavaScript();