I have a jQuery selector that gets an iframes <head>
. In development the contents on the <head>
look one way, but in production the <head>
has fewer items because I minify many of them into a single file. Here is the selector:
$(ifr.contentWindow.document.head)
In development when I look at the contents of what that returns I can see everything in the head but in production it doesn't return everything. In production innerHTML of the selector shows nothing after this line:
<script src="javascript/lib-min.js?urlCacheBust=30102015102138908"></script>
Here are the full contents of the head tag in production. Why is everything after that line not reported in innerHTML?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>XXXXXXXXXXXX</title>
<script>
var gApplicationName = 'XXXXXXXX';
var gSessionTimeoutMinutes = 'XXXXXXXX';
var gShowSessionEstablishedMsg = false;
var jspath = "javascript";
var imgpath = "images";
</script>
<script type="text/javascript" src="javascript/jquery-1.8.2.min.js?urlCacheBust=30102015115027842"></script>
<script type="text/javascript" src="css/autumn/jquery-ui.min.js?urlCacheBust=30102015115027842"></script>
<link type="text/css" href="css/autumn/jquery-ui.min.css?urlCacheBust=30102015115027842" rel="stylesheet" />
<script>jQuery.noConflict();</script>
<script src="javascript/lib-min.js?urlCacheBust=30102015115027842"></script>
<script src="javascript/jqPlugins/dump/jquery.dump.js?urlCacheBust=30102015115027842" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="screen" href="css/jqGrid/ui.jqgrid.css?urlCacheBust=30102015115027843"></link>
<script>jQuery.jgrid.no_legacy_api = true;</script>
<link rel="stylesheet" type="text/css" href="javascript/jqPlugins/gritter/gritter.css?urlCacheBust=30102015115027843"></link>
<link rel='stylesheet' type='text/css' href='javascript/jqPlugins/fullcalendar/fullcalendar.css?urlCacheBust=30102015115027843' />
<link rel='stylesheet' type='text/css' href='javascript/jqPlugins/fullcalendar/fullcalendar.print.css?urlCacheBust=30102015115027843' media='print' />
<link rel="stylesheet" href="javascript/jqPlugins/validationEngine/validationEngine.jquery.css?urlCacheBust=30102015115027843" type="text/css"/>
<link rel="stylesheet" type="text/css" href="javascript/jqPlugins/clockpicker/dist/jquery-clockpicker.css?urlCacheBust=30102015115027843">
<link href="css/dhtmlwindowcss.css?urlCacheBust=30102015115027843" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="images/app_favicon.ico">
<link title="legacytheme" href="css/autumn.css?urlCacheBust=30102015115027843" type="text/css" rel="stylesheet">
</head>
UPDATE - If I start removing the closing </script>
tags then the innerHTML does make it further down. innerHTML now returns everything down to this line:
<script type="text/javascript">jQuery.jgrid.no_legacy_api = true;</script>
But I obviously can't remove that closing script tag. I've never seen behavior like this before.
UPDATE - In my batch file for making lib-min.js if I remove this, everything works: javascript\jqPlugins\jqGrid\jquery.jqGrid.min.js
.