File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 1403
1403
1404
1404
// Proxy an iframe to handle location events on older versions of IE
1405
1405
try {
1406
- var body = document . body ;
1407
- var docMode = document . documentMode || 0 ;
1408
- if ( docMode < 8 ) {
1406
+ if ( ( document . documentMode || 0 ) < 8 ) {
1409
1407
var frame = document . createElement (
1410
1408
'<iframe src="javascript:0" style="display:none" tabindex="-1">'
1411
1409
) ;
1412
- this . iframe = body . appendChild ( frame ) . contentWindow ;
1410
+ var body = document . body ;
1411
+ this . iframe = body . insertBefore ( frame , body . firstChild ) . contentWindow ;
1412
+ if ( this . _wantsHashChange ) this . navigate ( fragment ) ;
1413
1413
}
1414
1414
} catch ( e ) { }
1415
1415
1416
- if ( this . iframe && this . _wantsHashChange ) {
1417
- this . navigate ( fragment ) ;
1418
- }
1419
-
1420
1416
// Depending on whether we're using pushState or hashes, and whether
1421
1417
// 'onhashchange' is supported, determine how we check the URL state.
1422
1418
if ( this . _hasPushState && 'onpopstate' in window ) {
You can’t perform that action at this time.
0 commit comments