Skip to main content

Hello All,

Can anyone explain me what is happening behind the screens when we trigger the rule close the browser window rule in K2.

Does this call window.close() in javascript.

Can any one explain me what this rule is doing from K2?

Hi Haridoll,


 


From my understanding, it calls a relativley common javascript window.close();


 


Now, the tricky part to that, is that different browsers interpret that message entirley differently, and depending on context.  Firefox, IE, and chrome all seem to have thier own opinion.


 


The best description of this I could find is as follows:


The close() method on Window objects should, if all the following conditions are met, close the browsing context A:


 


The corresponding browsing context A is script-closable.


The browsing context of the incumbent script is familiar with the browsing context A.


The browsing context of the incumbent script is allowed to navigate the browsing context A.


A browsing context is script-closable if it is an auxiliary browsing context that was created by a script (as opposed to by an action of the user), or if it is a browsing context whose session history contains only one Document.


 


Regards,


 


Mike


Reply