fix(Scenario): correct bootstrap issue on IE

we need to set the deferred bootstrap flag via window.name after the iframe's
src has been set, otherwise IE will reset it to empty string
This commit is contained in:
Igor Minar 2013-04-12 23:24:45 -07:00
parent b7b08eed02
commit ab755a25f9

View file

@ -63,8 +63,6 @@ angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorF
self.context.find('#test-frames').append('<iframe>');
frame = self.getFrame_();
frame[0].contentWindow.name = "NG_DEFER_BOOTSTRAP!";
frame.load(function() {
frame.unbind();
try {
@ -88,6 +86,9 @@ angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorF
errorFn(e);
}
}).attr('src', url);
// for IE compatibility set the name *after* setting the frame url
frame[0].contentWindow.name = "NG_DEFER_BOOTSTRAP!";
}
self.context.find('> h2 a').attr('href', url).text(url);
};