When closing a popup, I have code that checks the existence of a window.opener function, and if exists, calls that function. In IE8 however, the Ext.isFunction() method returns false, even though the method exists.

Main window:
HTML Code:
<body>
<script type="text/javascript">

    Ext.onReady(function() {
	Ext.fly('popup-link').on('click', openPopup);
    });

    openPopup = function(event) {
        event.stopEvent();
    	window.open('/path/to/popup.html', 'popupwindow', 'width=700,height=400');

    	//setup function for popup to call on close
    	window.closeCallback = function() {
		alert("CLOSE CALLBACK");
    	}
    }

	</script>

<a id="popup-link" href="">Cilck here to open a popup</a>

 </body>
Popup window:
HTML Code:
<body>

	<script type="text/javascript">

	Ext.onReady(function() {
		Ext.fly('close-window-link').on('click', closeWindow);
	});

	closeWindow = function(event) {
		event.stopEvent();
		callParentCloseCallback();
		window.close();
	};
	
	callParentCloseCallback = function() {
		if (Ext.isFunction(window.opener.closeCallback)) {
			window.opener.closeCallback();
		}
	};
	
	</script>
This is a popup
<br />
<a id="close-window-link" href="">Close Window</a>
</body>
This code successfully calls parent.opener.closeCallback() in Firefox. However, in IE8, the Ext.isFunction() method returns false, so I never call the parent window callback. I got around this by not using Ext.isFunction(), and instead just wrapping the function call in a try/catch:

HTML Code:
callParentCloseCallback = function() {
	try {
		window.opener.closeCallback();
	}
	catch (e) {
		//suppress
	}
};
This case was simplified for posting. Some notes on my environment:
  • I'm using JSP files
  • I believe IE is in Quirks mode
  • I've tried IE protected mode both on and off