diff -r 4d198a32ac7d -r d4809db37847 plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B584CA90-543B-4AED-B134-A3A616259DB9.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B584CA90-543B-4AED-B134-A3A616259DB9.html Thu Aug 19 17:48:04 2010 -0700 @@ -0,0 +1,124 @@ + + +
All modern desktop browsers provide features to support developers debugging +JavaScript. While the browsers do not directly integrate true debugging support, +they usually support directing JavaScript error messages and logging statements +to either a console display or popup messages. Mozilla Firefox supports this +feature.
+Consider the following trivial example of a web page with a JavaScript
+error. It calls the method document.writex()
which does
+not exist.
<html> +<body> +<script language = "JavaScript"> +document.write('Testing1<br/>\n'); +document.writex('Testing2<br>\n'); +</script> +Test Page +</body> +</html> ++
SETTINGS
Go to Web > Settings > General and select the following option
+• Java/ECMA Script
+This option provides you support to enable/disable JavaScript.
+ +
+ Enable + |
+
+ Enable JavaScript Console Support + |
+
+ Disable + |
+
+ Disable JavaScript Console Support + |
+
• Java/ECMA Script errors
+This option provides you choices to display and log errors.
+
+ No Notification + |
+
+ Enable JavaScript Console Support + |
+
+ Create Log file + |
+
+ It will create log file to the |
+
+ Show pop-up notes + |
+
+ It will show pop-up notes on the emulator screen + |
+
+ Log and pop-up notes + |
+
+ It will show pop-up notes and create logs to |
+
ERROR SCENARIO
Try to run the JavaScript example that has an error. Just like an ordinary +browser, it will display error message based on your selected criteria from +the web settings.
+HOW TO USE
Below is the functional description of how this feature can be used.
+An option +for JavaScript console is added to the Browser settings. There are three options +for this setting: Disable, Prompt and Log.
+When the Disable option is selected, the JavaScript +console for browser / widgets are disabled.
When the Prompt option is selected, JavaScript errors +and exceptions are presented in a popup dialog
When the Log option is selected, JavaScript errors
+and exceptions are logged into a text file that is placed in a user accessible
+area of the device’s file system. For example, C:\data
JavaScript
+console supports console.log
for logging messages to the
+console