[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 3cc72ac03f
commit 948e66c3d6
8 changed files with 119 additions and 0 deletions

View file

@ -59,6 +59,8 @@ public:
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");
bool pwa_needs_update() const;
Error pwa_update();
static JavaScript *get_singleton();
JavaScript();