Changeset 183


Ignore:
Timestamp:
05/20/05 06:11:44 (15 years ago)
Author:
gogo
Message:

Fix for #178 dialog.js tried to set events on frames with src outside
the domain causing security exceptions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dialog.js

    r182 r183  
    5959        }; 
    6060        capwin(window); 
    61         // capture other frames 
    62         for (var i = 0; i < window.frames.length; capwin(window.frames[i++])); 
     61        // capture other frames, note the exception trapping, this is because 
     62  // we are not permitted to add events to frames outside of the current 
     63  // window's domain. 
     64        for (var i = 0; i < window.frames.length; i++) {try { capwin(window.frames[i]); } catch(e) { } }; 
    6365        // make up a function to be called when the Dialog ends. 
    6466        Dialog._return = function (val) { 
     
    6870                relwin(window); 
    6971                // capture other frames 
    70                 for (var i = 0; i < window.frames.length; relwin(window.frames[i++])); 
     72                for (var i = 0; i < window.frames.length; i++) { try { relwin(window.frames[i]); } catch(e) { } }; 
    7173                Dialog._modal = null; 
    7274        }; 
Note: See TracChangeset for help on using the changeset viewer.