[OpenLayers-Trac] [OpenLayers] #880: Event object conflict

OpenLayers trac at openlayers.org
Fri Aug 3 10:55:35 EDT 2007


#880: Event object conflict
--------------------+-------------------------------------------------------
 Reporter:  euzuro  |       Owner:  euzuro     
     Type:  bug     |      Status:  new        
 Priority:  major   |   Milestone:  2.5 Release
Component:  Events  |     Version:  2.4        
 Keywords:          |  
--------------------+-------------------------------------------------------
 As reported by Paul S to dev@

 {{{

  As part of removing prototype.js
 dependency, it appears that you have kept most of Prototype's event
 handling code, including the following (lines 327-331 of Events.js):

 if (window.Event) {
   OpenLayers.Util.extend(window.Event, OpenLayers.Event);
 } else {
   var Event = OpenLayers.Event;
 }

 If you include OpenLayers.js AFTER including prototype.js, this
 effectively replaces most of prototype's Event object with the
 OpenLayers.Event object, which has undesirable results (i.e. calling
 Event.observe is actually calling OpenLayers.Event.observe)

 Is there a particular reason why we are putting OpenLayers.Event into
 the global namespace?
 }}}

-- 
Ticket URL: <http://trac.openlayers.org/ticket/880>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list