From 0450c8e21e15b80933727942ea4b682944918bde Mon Sep 17 00:00:00 2001 From: crschmidt Date: Mon, 16 Oct 2006 13:51:48 +0000 Subject: [PATCH] Zac Barton reports that IEs4Lin does not like document.body.filters. (Confirmed via forums for the product.) Although this is a bug in that browser, this work around will allow OL to work for that browser, according to testing. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1700 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Util.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 2221125a69..2cbf0254a0 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -231,8 +231,19 @@ OpenLayers.Util.onImageLoadError = function() { OpenLayers.Util.alphaHack = function() { var arVersion = navigator.appVersion.split("MSIE"); var version = parseFloat(arVersion[1]); + var filter = false; - return ( (document.body.filters) && + // IEs4Lin dies when trying to access document.body.filters, because + // the property is there, but requires a DLL that can't be provided. This + // means that we need to wrap this in a try/catch so that this can + // continue. + + try { + filter = document.body.filters; + } catch (e) { + } + + return ( filter && (version >= 5.5) && (version < 7) ); }