Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

JavaScript execution change in Browser 7.3 on Symbian^3 devices (Known Issue)

From Wiki
Jump to: navigation, search

Symbian Browser and Web Runtime 7.3 for Developers introduces changes to the JavaScript engine. The way function declarations are interpreted inside conditional expressions has been changed.

Article Metadata
Tested with
Devices(s): Nokia N8
Platform(s): Symbian^3
Created: User:Kbwiki (20 Oct 2010)
Last edited: hamishwillee (12 Mar 2012)


If a function declaration and definition are in a conditional JavaScript expression, the Browser 7.2 JavaScript engine does not interpret them. In the Browser 7.3 JavaScript engine, regardless of whether the function can be executed or not, the JavaScript engine compiles all of the functions.

var calculateSum = true;
function calculate(){
function calculate(){

If the calculate function is called, the Browser 7.2 JavaScript engine prompts sum, whereas the Browser 7.3 JavaScript engine executes the last defined calculate function, hence prompting subtract.


Please make sure that your Symbian Web Runtime widget does not rely on this type of coding pattern as it might cause unforeseeable consequences in Browser 7.3.

This page was last modified on 12 March 2012, at 04:15.
61 page views in the last 30 days.