how is it even possible to declare a function inside an IfStatement ? because according to the ecmascript spec only a Statement can be there.
if ( Expression ) Statement
if ( Expression ) Statement else Statement
and FunctionDeclaration isn't a Statement but it's a Declaration
so maybe i've missed something or maybe Browsers cannot implement such thing nowadays because it may ruin websites that use function declarations inside an if statement.