On Thu, Feb 24, 2011 at 12:26 AM, Yves <[email protected]> wrote:
> The Object "class" contains functions anyway, why aren't they > iterated, too? And if you iterate over *anything* you have to live > with the results. If you get a variable from an unknown source (which > is not unusual in browsers' JavaScript) of a type you cannot handle, > it's your (here: Google's) fault to use it assuming some other type. > Look, this horse left the barn years ago. You can make the case all you want, but in the end you'll just have to live with the fact that extending Object.prototype will break other people's code, so you just can't do it. For more information: http://www.google.com/search?q=object.prototype+is+verboten Could it be that Google is trying to detect a browser first and then > act blindly upon profiles? Isn't that the wrong way to go, shouldn't > you always act carefully on your current environment? What if a new > browser appears? No, that's not it at all. As I already explained and Ben confirmed, it's because your addition to Object.prototype breaks every for..in loop. -Mike -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
