Skip to content

Commit

Permalink
Merge pull request #4 from ntvy95/patch-1
Browse files Browse the repository at this point in the history
Fix the error "Not allowed to navigate top frame to data URL"
  • Loading branch information
sweppner committed Nov 4, 2017
2 parents 2edb3fb + 0d02b4c commit 8e35658
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions js/controllers/MenuController.js
Expand Up @@ -17,10 +17,16 @@ app.controller('MenuController', ['$scope', function($scope) {
final_download["data"] = total_annotations;


var something = window.open("data:text/json," + encodeURIComponent(JSON.stringify(final_download)),
/*var something = window.open("data:text/json," + encodeURIComponent(JSON.stringify(final_download)),
"_blank");
something.focus();
something.focus();*/

var iframe = "<iframe width='100%' height='100%' src='" + "data:text/json," + encodeURIComponent(JSON.stringify(final_download)) + "'></iframe>"
var x = window.open();
x.document.open();
x.document.write(iframe);
x.document.close();

};

}]);
}]);

0 comments on commit 8e35658

Please sign in to comment.