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.
Comments (3)
Hi @iameli Just debugged this. So jQuery is parsing the HTML and concluding that you're injecting a script, so in order for it to bind on load events, it translates that into a synchronous XHR+eval. XHook does not support synchronous XHR because I allow asynchronous hooks, I could detect if there are asynchronous hooks, though when it loads - XDomain creates an asynchronous hook, so this would still be broken in the majority of cases. I am throwing an error about this though jQuery is silently throwing it away :(
Since I can't support sync XHR I'll have to close this as "wont fix", though I can offer a workaround.
Instead of jQuery:
Vanilla
This is definitely worth including in the docs.
As a side note, since the world is moving away from IE67, I think people should try to depend less on jQuery. See here.
from xhook.
Interesting! TIL that synchronous XHR is a thing.
We're actually using xdomain as part of our project to move into a new API and away from our old jQuery based application, so we're definitely on the same page there. :) I ended up working around it in a very similar fashion -- the project was already including head.js for unrelated reasons so I just ended up using that.
Thanks for looking into it!
from xhook.
Hey @iameli just an update to this, I've implemented sync requests in XHook to fix a chrome iOS bug so this should resolve some of these issues. Though note, when the request is sync, async hooks must be skipped and this includes XDomain so this just attempts to allow external code to operate correctly, we still can't use XDomain to allow sync crossdomain calls.
from xhook.
Related Issues (20)