Changeset 6763
- Timestamp:
- 04/02/08 07:53:20 (9 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Util.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Util.js
r6718 r6763 57 57 } 58 58 } 59 59 60 /** 60 61 * IE doesn't include the toString property when iterating over an object's … … 62 63 * the source has its own toString property. 63 64 */ 64 if(source.hasOwnProperty && source.hasOwnProperty('toString')) { 65 66 /* 67 * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative 68 * prototype object" when calling hawOwnProperty if the source object 69 * is an instance of window.Event. 70 */ 71 72 var sourceIsEvt = typeof window.Event == "function" 73 && source instanceof window.Event; 74 75 if(!sourceIsEvt 76 && source.hasOwnProperty && source.hasOwnProperty('toString')) { 65 77 destination.toString = source.toString; 66 78 } … … 511 523 */ 512 524 OpenLayers.Util.applyDefaults = function (to, from) { 525 526 /* 527 * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative 528 * prototype object" when calling hawOwnProperty if the source object is an 529 * instance of window.Event. 530 */ 531 var fromIsEvt = typeof window.Event == "function" 532 && from instanceof window.Event; 533 513 534 for (var key in from) { 514 535 if (to[key] === undefined || 515 ( from.hasOwnProperty536 (!fromIsEvt && from.hasOwnProperty 516 537 && from.hasOwnProperty(key) && !to.hasOwnProperty(key))) { 517 538 to[key] = from[key]; … … 523 544 * the source has its own toString property. 524 545 */ 525 if( from.hasOwnProperty546 if(!fromIsEvt && from.hasOwnProperty 526 547 && from.hasOwnProperty('toString') && !to.hasOwnProperty('toString')) { 527 548 to.toString = from.toString;
