mirror of
https://github.com/element-hq/element-call.git
synced 2026-06-04 19:01:38 +00:00
Add Promise.withResolvers polyfill for older WebViews (Chrome < 119)
This commit is contained in:
+13
@@ -16,6 +16,19 @@
|
||||
<script>
|
||||
window.global = window;
|
||||
</script>
|
||||
<!-- Polyfill for Chrome < 119 (Huawei WebView, etc.) -->
|
||||
<script>
|
||||
if (!Promise.withResolvers) {
|
||||
Promise.withResolvers = function () {
|
||||
var resolve, reject;
|
||||
var promise = new Promise(function (a, b) {
|
||||
resolve = a;
|
||||
reject = b;
|
||||
});
|
||||
return { promise: promise, resolve: resolve, reject: reject };
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<% if (packageType === "full") { %>
|
||||
<!-- Open graph meta tags -->
|
||||
|
||||
Reference in New Issue
Block a user