Skip to content

Commit

Permalink
Safari: don't be lenient with XHR blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris committed Feb 5, 2015
1 parent c381183 commit c9160fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions platform/safari/vapi-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,14 @@ dispatchEvent(e);\
return e.detail.url === false;\
},\
wo = open,\
xo = XMLHttpRequest.prototype.open;\
xo = XMLHttpRequest.prototype.open,\
_noOP = function(){};\
open = function(u) {\
return block(u, 'popup') ? null : wo.apply(this, arguments);\
};\
XMLHttpRequest.prototype.open = function(m, u, s) {\
return xo.apply(this, block(u, 'xmlhttprequest') ? ['HEAD', u, s] : arguments);\
if(block(u, 'xmlhttprequest')) return {send: _noOP};\
else return xo.apply(this, arguments);\
};";
if(frameId === 0) {
tmpScript += "\
Expand Down

0 comments on commit c9160fa

Please sign in to comment.