OpenLayers OpenLayers

Changeset 4271

Show
Ignore:
Timestamp:
09/13/07 19:17:44 (1 year ago)
Author:
euzuro
Message:

Here we have finally solved the smashing of the Event object problem. Once and forall. God save the queen when 3.0 comes we're getting rid of this sloppiness. See r4040 for more info on why we've done all this. (Closes #880)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Events.js

    r4110 r4271  
    327327// FIXME: Remove this in 3.0. In 3.0, Event.stop will no longer be provided 
    328328// by OpenLayers. 
    329 if (!window.Event) { 
    330   var Event = OpenLayers.Event; 
     329if (window.Event) { 
     330    OpenLayers.Util.applyDefaults(window.Event, OpenLayers.Event); 
     331} else { 
     332    var Event = OpenLayers.Event; 
    331333} 
    332334 
  • trunk/openlayers/tests/test_Events.html

    r4059 r4271  
    333333    } 
    334334 
     335    /** HACK HACK HACK Deprecated This test should be removed in 3.0 **/ 
     336    function test_Events_globalEventObject(t) { 
     337        t.plan(1); 
     338        t.ok(Event.stop, "a stop() function exists on the global JS Event object, if indeed it exists. This is legacy deprecated and will be gone in 3.0"); 
     339    } 
    335340    
    336341