ffab22ba19
prototype is extended. Although OpenLayers is not designed to work when this fundamental violation of Javascript is in place, we can at least not fail so miserably in this case: this gets us back to a similar level of functionality as we had in 2.5. This was brought up by a user working on a viamichelin layer, which apparently extends the object prototype (bad!), and fixed in conjuction with tschaub. r=pgiraud,tschaub (Pullup #1502) git-svn-id: http://svn.openlayers.org/trunk/openlayers@6832 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
22 lines
522 B
HTML
22 lines
522 B
HTML
<html>
|
|
<head>
|
|
<script src="../lib/OpenLayers.js"></script>
|
|
<script type="text/javascript">
|
|
|
|
var map;
|
|
|
|
// Ensure that we continue to work if silly Javascript frameworks
|
|
// extend object.
|
|
Object.prototype.foo = function() { }
|
|
function test_Events_Object_Extension(t) {
|
|
t.plan(1)
|
|
map = new OpenLayers.Map("map");
|
|
t.ok("Map created if object prototype is extended.");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="map" style="width: 600px; height: 300px;"/>
|
|
</body>
|
|
</html>
|