twilson63/ngUpload — pull request #56 by trov-codystebbins (2013-07-24 23:22:12+00:00)
Title: SCRIPT70 Permission denied in selectors after iframe was submitted - Use native DOM over jQuery for iFrame HTML

Currently in IE9-10 there are issues with the jQuery library regarding failing selectors listed here [1]. Although it claims to be fixed, the has confirmed reports on in the comments and occurs in my use of ngUpload on IE9-10

Following the test case [4] listed on the jQuery bug report, I rewrote the portion of ngUpload that retrieves the html from the iFrame in cross browser native DOM [2]. The other benefit is that .html() is completely unnecessary since $.html() simply refers to innerHTML and performs unnecessary cross browser checks given the support for innerHTML [2, 3]. On older browsers like IE8 those cross browser checks can be a meaningful performance concern [3].

Happy to work with you on this if you can think of a better solution, but I would love to get this in ngUpload since the library has been fantastic besides this hitch. I only have one concern with this pull request that should confirm before merging, and I will comment inline on it.

[1] http://bugs.jquery.com/ticket/13936
[2] http://stackoverflow.com/questions/7570496/getting-the-document-object-of-an-iframe
[3] http://stackoverflow.com/questions/3563107/jquery-html-vs-innerhtml
[4]
```javascript
$(function () {
$('input#button').click(function () {
$('span');
$('iframe').contents().find('form')[0].submit();
});
});
```