Ticket #1502: object_extension.patch
| File object_extension.patch, 1.6 kB (added by crschmidt, 5 months ago) |
|---|
-
tests/Extras.html
old new 1 <html> 2 <head> 3 <script src="../lib/OpenLayers.js"></script> 4 <script type="text/javascript"> 5 6 var isMozilla = (navigator.userAgent.indexOf("compatible") == -1); 7 var map; 8 9 // Ensure that we continue to work if silly Javascript frameworks 10 // extend object. 11 Object.prototype.foo = function() { } 12 function test_Events_Object_Extension(t) { 13 t.plan(1) 14 m = new OpenLayers.Map("map"); 15 t.ok("Map created if object prototype is extended."); 16 } 17 </script> 18 </head> 19 <body> 20 <div id="map" style="width: 600px; height: 300px;"/> 21 </body> 22 </html> -
tests/list-tests.html
old new 1 1 <ul id="testlist"> 2 2 <li>OpenLayers.html</li> 3 <li>Extras.html</li> 3 4 <li>Ajax.html</li> 4 5 <li>BaseTypes.html</li> 5 6 <li>BaseTypes/Bounds.html</li> -
lib/OpenLayers/Events.js
old new 532 532 */ 533 533 register: function (type, obj, func) { 534 534 535 if (func != null) { 535 if (func != null && 536 OpenLayers.Util.indexOf(this.eventTypes, type) != -1) { 536 537 if (obj == null) { 537 538 obj = this.object; 538 539 }
