OpenLayers OpenLayers

root/trunk/openlayers/tests/Popup/FramedCloud.html

Revision 6765, 433 bytes (checked in by crschmidt, 9 months ago)

The FramedCloud popup throws an error if you attempt to call setContentHTML
before you add the popup to the map. To prevent this, don't call construct
or updateBlocks if relativePosition is null, to prevent this error message.
r=elemoine, (Pullup #1479)

Line 
1 <html>
2 <head>
3   <script src="../../lib/OpenLayers.js"></script>
4   <script type="text/javascript">
5
6    function test_Popup_FramedCloud_setHTML(t) {
7         t.plan(1);
8         popup = new OpenLayers.Popup.FramedCloud();
9         popup.setContentHTML("<p></p>");
10         t.ok("setHTML on popup not yet added to map doesn't fail");
11    }
12
13   </script>
14 </head>
15 <body>
16 <div id="map" style="width:512px; height:256px"> </div>
17 </body>
18 </html>
Note: See TracBrowser for help on using the browser.