Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

please support custom current promisePolyfillJS #302

Closed
virskor opened this issue Mar 8, 2020 · 5 comments
Closed

please support custom current promisePolyfillJS #302

virskor opened this issue Mar 8, 2020 · 5 comments

Comments

@virskor
Copy link

virskor commented Mar 8, 2020

please support custom promisePolyfillJS.
this is good plugin, but i found my webpage dose not work well with this plugin, after debugging i found const promisePolyfillJS on IOS side would confuse us.

not everyone use same polyfill version, please support this feature.
THIS IS AN IMPORTANT ISSUE.
THANKS FOR YOUR GREAT JOB.

@virskor virskor changed the title please support promisePolyfillJS please support custom current promisePolyfillJS Mar 8, 2020
@virskor
Copy link
Author

virskor commented Mar 8, 2020

/Classes/InAppWebView.swift

line about 43

// // https://github.com/taylorhakes/promise-polyfill/blob/master/src/index.js
// let promisePolyfillJS = """
// if (window.Promise == null) {
//   var setTimeoutFunc = setTimeout;
//   function isArray(x) {
//     return Boolean(x && typeof x.length !== "undefined");
//   };
//   function noop() {}
//   function bind(fn, thisArg) {
//     return function() {
//       fn.apply(thisArg, arguments);
//     };
//   };
//   function Promise(fn) {

@virskor
Copy link
Author

virskor commented Mar 8, 2020

if anyone has same problem with me, just comment it!!

@pichillilorenzo
Copy link
Owner

Released new version 3.0.0 with updated polyfill: https://github.com/tildeio/rsvp.js

Let me know if your code works now.. However this polyfill is added only in webviews that are too old and where window.Promise is not defined.. I use it because I need it to make javascript bridge work properly!

This was referenced Jul 6, 2020
@virskor
Copy link
Author

virskor commented Jul 30, 2020

It worked fine now

@virskor virskor closed this as completed Feb 10, 2022
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants