diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-07 13:21:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-07 13:21:53 +0100 |
commit | 6a33d8b93fc7175865a9c064c6ba4bf400c9650d (patch) | |
tree | 53f7fc778fdc8080a9b7b59fc6f47c07f6a585c5 /platform/javascript/api/api.cpp | |
parent | 88aea70a098d91f1887e7c4e3218ce23c42e3b4f (diff) | |
parent | 948e66c3d6930924b54ec48a0dfc929040befb0a (diff) |
Merge pull request #57718 from Faless/js/4.x_pwa_prefer_cache_pr
Diffstat (limited to 'platform/javascript/api/api.cpp')
-rw-r--r-- | platform/javascript/api/api.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/javascript/api/api.cpp b/platform/javascript/api/api.cpp index 0c4accccc3..4190b24b8e 100644 --- a/platform/javascript/api/api.cpp +++ b/platform/javascript/api/api.cpp @@ -71,6 +71,9 @@ void JavaScript::_bind_methods() { ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "create_object", &JavaScript::_create_object_bind, mi); } ClassDB::bind_method(D_METHOD("download_buffer", "buffer", "name", "mime"), &JavaScript::download_buffer, DEFVAL("application/octet-stream")); + ClassDB::bind_method(D_METHOD("pwa_needs_update"), &JavaScript::pwa_needs_update); + ClassDB::bind_method(D_METHOD("pwa_update"), &JavaScript::pwa_update); + ADD_SIGNAL(MethodInfo("pwa_update_available")); } #if !defined(JAVASCRIPT_ENABLED) || !defined(JAVASCRIPT_EVAL_ENABLED) @@ -102,6 +105,12 @@ Variant JavaScript::_create_object_bind(const Variant **p_args, int p_argcount, } #endif #if !defined(JAVASCRIPT_ENABLED) +bool JavaScript::pwa_needs_update() const { + return false; +} +Error JavaScript::pwa_update() { + return ERR_UNAVAILABLE; +} void JavaScript::download_buffer(Vector<uint8_t> p_arr, const String &p_name, const String &p_mime) { } #endif |