Leaflet/src/map
oslek 7dd7e4f699 Robust array type check for cross-frame support
In a multi-frame DOM environment, if setView is called with an array for
the first parameter, a subsequent call to getBounds raises "Invalid
LatLng object" exception. This is the case if the array passed to
setView was created outside the iFrame that contains the map. It causes
the array test using "instanceof" in L.latLng to fail, and
_initialTopLeftPoint to not being properly initialized.

Thank you to Juriy Zaytsev for the full explaination:
http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
John Resig and Dean Edwards post comments and concur.
2013-01-14 14:04:50 -08:00
..
anim made up my mind about comment format, add some more comments 2012-12-20 12:37:40 +02:00
ext made up my mind about comment format, add some more comments 2012-12-20 12:37:40 +02:00
handler made up my mind about comment format, add some more comments 2012-12-20 12:37:40 +02:00
Map.js Robust array type check for cross-frame support 2013-01-14 14:04:50 -08:00