mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-21 19:09:20 +00:00
Add Promise.withResolvers polyfill for older WebViews (Chrome < 119)
This commit is contained in:
13
index.html
13
index.html
@@ -16,6 +16,19 @@
|
|||||||
<script>
|
<script>
|
||||||
window.global = window;
|
window.global = window;
|
||||||
</script>
|
</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") { %>
|
<% if (packageType === "full") { %>
|
||||||
<!-- Open graph meta tags -->
|
<!-- Open graph meta tags -->
|
||||||
|
|||||||
Reference in New Issue
Block a user