Comments (4)
We started experiencing this "issue" recently, but I believe it's just a result of the request timing out and the library deleting the global function, then the request completing afterwards.
from fetch-jsonp.
#29
see here, there is no way to cancel the script request.
from fetch-jsonp.
I'm running into this issue here too...
So far, I've been able to confirm that it successfully fetches the JSONP data by defining window.search_results()
. In your example, it would be:
fetchJsonp('http://assets.airbnb.com/frontend/search_results.js')
window.search_results = function(json){
debugger; // json = Array(20)
return json
}
At the point of the debugger, it does have the JSON. However, I would like it to be the return value outside of the scope of window.search_results()
i.e.:
fetchJsonp('http://assets.airbnb.com/frontend/search_results.js')
window.search_results = function(json){
debugger; // json = Array(20)
return json
}
debugger; // i want access to json here
from fetch-jsonp.
You should use jsonpCallbackFunction
instead of jsonpCallback
.
fetchJsonp('http://assets.airbnb.com/frontend/search_results.js', {
jsonpCallbackFunction: 'search_results',
})
from fetch-jsonp.
Related Issues (20)
- Optional callback on URL HOT 1
- CORS FETCH on IE9 HOT 1
- error in ie8 HOT 2
- Does it support react native?How to use jsonp in react native? HOT 1
- Uncaught ReferenceError: jsonCallback is not defined HOT 2
- could you support the interface return a variable HOT 1
- Place callback parameter first inline HOT 1
- Trying to use fetch-jsonp to fech TEXT only value HOT 1
- CDNJS link wrong
- [BUG] There is no jsonCallbackFunction HOT 1
- add support for abort signal??? HOT 2
- Library does not support nonce HOT 1
- Call the local interface in react to report timed out HOT 2
- Multiple requests - being silently aborted and throwing timeouts etc?
- how to import? HOT 1
- How can i change MIME type? HOT 1
- fetch-jsonp HOT 1
- Required options
- Provide an esm version HOT 1
- Provide a fetchPriority option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fetch-jsonp.