diff --git a/build.properties b/build.properties index a3114748..a3caf94e 100644 --- a/build.properties +++ b/build.properties @@ -2,7 +2,7 @@ PROJECT: env-js BUILD_MAJOR: 1 BUILD_MINOR: 2 -BUILD_ID: 26 +BUILD_ID: 27 BUILD_VERSION: ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID} BUILD: ${PROJECT}.${BUILD_VERSION} VERSION: ${BUILD} ${DSTAMP} diff --git a/src/platform/core/window.js b/src/platform/core/window.js index 14aae35d..03975efa 100644 --- a/src/platform/core/window.js +++ b/src/platform/core/window.js @@ -45,16 +45,16 @@ Envjs.windows = function(uuid, scope){ Envjs.loadFrame = function(frame, url){ try { //console.log('loading frame %s', url); - if(frame.contentWindow){ + if(frame.contentWindow && frame.contentWindow.close){ //mark for garbage collection - frame.contentWindow = null; + frame.contentWindow.close(); } //create a new scope for the window proxy //platforms will need to override this function //to make sure the scope is global-like - frame.contentWindow = Envjs.proxy(); - new Window(frame.contentWindow, window); + frame.contentWindow = Envjs.proxy({}); + new Window(frame.contentWindow, window); //I dont think frames load asynchronously in firefox //and I think the tests have verified this but for diff --git a/src/window/window.js b/src/window/window.js index b88a8213..63d8afd8 100644 --- a/src/window/window.js +++ b/src/window/window.js @@ -278,6 +278,15 @@ Window = function(scope, parent, opener){ }, close: function(){ //console.log('closing window %s', __windows__[$uuid]); + var frames = $document.getElementsByTagName('frame'), + iframes = $document.getElementsByTagName('iframe'), + i; + for(i=0;i