Changeset 14930

Show
Ignore:
Timestamp:
08/21/08 18:42:52 (3 months ago)
Author:
bill
Message:

Fixes #7498: dijit.getDocumentWindow() throws exception in Safari
The safari-only code block is apparently no longer needed in safari 3,
and it causes issues in some circumstances, so removing it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/_base/window.js

    r13301 r14930  
    22 
    33dijit.getDocumentWindow = function(doc){ 
    4         //      summary 
    5         //      Get window object associated with document doc 
     4        // summary: 
     5        //              Get window object associated with document doc 
    66 
    7         // With Safari, there is not way to retrieve the window from the document, so we must fix it. 
    8         if(dojo.isSafari && !doc._parentWindow){ 
    9                 /* 
    10                         This is a Safari specific function that fix the reference to the parent 
    11                         window from the document object. 
    12                 */ 
    13                 var fix=function(win){ 
    14                         win.document._parentWindow=win; 
    15                         for(var i=0; i<win.frames.length; i++){ 
    16                                 fix(win.frames[i]); 
    17                         } 
    18                 } 
    19                 fix(window.top); 
    20         } 
    21  
    22         //In some IE versions (at least 6.0), document.parentWindow does not return a 
    23         //reference to the real window object (maybe a copy), so we must fix it as well 
    24         //We use IE specific execScript to attach the real window reference to 
    25         //document._parentWindow for later use 
     7        // In some IE versions (at least 6.0), document.parentWindow does not return a 
     8        // reference to the real window object (maybe a copy), so we must fix it as well 
     9        // We use IE specific execScript to attach the real window reference to 
     10        // document._parentWindow for later use 
    2611        if(dojo.isIE && window !== document.parentWindow && !doc._parentWindow){ 
    2712                /*