Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that the ActiveX exception is caught if it's unable to be l…
…oaded. Fixes #2849.
- Loading branch information
Showing
1 changed file
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3f648c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is using file protocol?
Have you considered creating an identifier for native support in containing scope?
3f648c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just declare this whole function conditionally, for best performance.
3f648c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@garrett IE7+ can't access local files from XMLHttpRequest and has to use ActiveXObject
3f648c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just split the function in two: c68fbc2
3f648c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdalton;
Yes, I know
XMLHttpRequest
doesn't supportfile:
..I am curios as what sort of application is using
file
protocol. As in "why do you need that?".I just committed some XHR stuff, to APE.
3f648c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant in IE.
XMLHttpRequest
doesn't supportfile
in IE.Other implementations may, but that is not something that should be relied upon; it is an implementation-dependent feature. So I am wondering who is relying on that nonstandard behavior for production code and why it is there. I know the history with jQUery and wanting to support file, but not the reason for wanting.
http://www.w3.org/TR/XMLHttpRequest/
3f648c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be cases where jQuery AJAX may be used on
file
is serverless intranets or for testing without a web server, i.e. accessed via I:\intranet\index.html for example. Probably rarely used by developers, but is there any harm in including it? MooTools will fail withfile
(http://github.com/mootools/mootools-core/blob/master/Source/Core/Browser.js#L70) as will Prototype (http://github.com/sstephenson/prototype/blob/master/src/ajax/ajax.js).There is also the possibility that jQuery may be used in HTML Applications (HTA) or Windows gadgets (although I do not know if people use it or how well it works). Sticking to the standards is important, but why not go further (as long as it doesn't break other browsers or involve too much extra code)?