Main.WisdomConfiguration


Configuring and initializing Wisdom:

Your scripts must define a global object called "wisdomConfiguration" with members customized from below, before the wisdom library script itself is included into the page context. Here is an example of the top of an HTML page that includes and configures wisdom:

TODO: What happens when various warnings are not turned off etc.

<html>
   <head>
      <title>Wisdom Test Page</title>
      <link rel="stylesheet" href="wisdom_release_style-0.2.css" />
   </head>
<body>
    <script type="text/javascript">

       // Here we configure the wisdom library.
       // This snippet could be in the HTML head, or anywhere else
       // as long as it comes before the inclusion of the wisdom library script.

       var wisdomConfiguration = {
          applicationName: "Test Page",
          expectedWisdomVersionMajor: 0,
          expectedWisdomVersionMinor: 2,
          consoleElementId: "wisdomConsole",
          alertOnMissingConsoleElement: true,
          existingConsoleWarning: false,
          overwriteConsole: true,
          overwriteConsoleWarning: false
       };	
    </script>
    <!-- Include wisdom library -->
    <script type="text/javascript" src="wisdom_release_min-0.2.js"></script>
   ...
   ...

If an option is not included, it will default as below:

 applicationName: "Wisdom-based Application"
 expectedWisdomVersionMajor: $YOUR_LIBRARY_VERSION
 expectedWisdomVersionMinor: $YOUR_LIBRARY_VERSION
 consoleElementId: "WisdomConsole"
 alertOnMissingConsoleElement: true
 existingConsoleWarning: true
 overwriteConsole: false
 overwriteConsoleWarning: true