fix for #847 - use bind() instead of bindAsEventListener()= when appropriate
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3786 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -239,9 +239,9 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
|
||||
if(delayDisplay) {
|
||||
image.style.display = "none";
|
||||
OpenLayers.Event.observe(image, "load",
|
||||
OpenLayers.Util.onImageLoad.bindAsEventListener(image));
|
||||
OpenLayers.Util.onImageLoad.bind(image));
|
||||
OpenLayers.Event.observe(image, "error",
|
||||
OpenLayers.Util.onImageLoadError.bindAsEventListener(image));
|
||||
OpenLayers.Util.onImageLoadError.bind(image));
|
||||
|
||||
}
|
||||
|
||||
@@ -434,9 +434,9 @@ OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL,
|
||||
if (delayDisplay) {
|
||||
img.style.display = "none";
|
||||
OpenLayers.Event.observe(img, "load",
|
||||
OpenLayers.Util.onImageLoad.bindAsEventListener(div));
|
||||
OpenLayers.Util.onImageLoad.bind(div));
|
||||
OpenLayers.Event.observe(img, "error",
|
||||
OpenLayers.Util.onImageLoadError.bindAsEventListener(div));
|
||||
OpenLayers.Util.onImageLoadError.bind(div));
|
||||
}
|
||||
|
||||
OpenLayers.Util.modifyAlphaImageDiv(div, id, px, sz, imgURL, position,
|
||||
|
||||
Reference in New Issue
Block a user