8000 Fetchival not working with Safari · Issue #15 · typicode/fetchival · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fetchival not working with Safari #15

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

Open
adadgio opened this issue Sep 19, 2016 · 3 comments
Open

Fetchival not working with Safari #15

adadgio opened this issue Sep 19, 2016 · 3 comments

Comments

@adadgio
Copy link
adadgio commented Sep 19, 2016

I suspect something inside a Promise is not working inside fetchival. Its is not working with Version 9.1.3, and no error messages are shown. The promise never gest fulfilled.

Code example bellow (work on Chrome and Firefox).

console.log('Console log works here');

fetchival(module.settings.endpoint(['user', apiKey])).get().then(function(response) {
    console.log("Iam here, but never works on safari");
    console.log(response);

});
@adadgio
Copy link
Author
adadgio commented Sep 19, 2016

Just to confirm what I'v said, i have replaced the fetchival Ajax code by a random library (https://github.com/yanatan16/nanoajax), and it works in Safari.

@xiaokaike
Copy link

fetchival is base on window.fetch

// Expose fetch so that other polyfills can be used
  // Bind fetch to window to avoid TypeError: Illegal invocation
  fetchival.fetch = typeof fetch !== 'undefined' ? fetch.bind(window) : null

Safari is not support fetch

@typicode
Copy link
Owner

Hi @adadgio,

fetchival doesn't come with fetch polyfill, but you can use the following command and you should have everything you need ;)

npm install es6-promise whatwg-fetch --save # polyfills
npm install fetchival --save

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

3 participants
0