Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

please support custom current promisePolyfillJS #302

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

please support custom current promisePolyfillJS #302

virskor opened this issue Mar 8, 2020 · 4 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants