Line 30: |
|
</nowiki></pre>
|
|
</nowiki></pre>
|
|
|
|
|
- |
That's it! With above code in your page, you should be able to see a popup log window appear and log, that should
|
+ |
That's it! With above code in your page, you should be able to see a popup debug log window appear, that should
|
|
be clear indication that JSX is enabled.
|
|
be clear indication that JSX is enabled.
|
|
|
|
|
Line 36: |
- |
Everything in your JSX enabled application should be done by packages. Some other frameworks create one monolithic .js file that holds everything, but this is not our way. The advantage of this approach is that you can load only those parts of JSX Toolkit (and your packages) that the page actually needs. This saves bandwidth, and of course, user frustration with slowly loading pages. If you want to write all your application code inside the head tags, be our guest.
|
+ |
Everything in your JSX enabled application should be done by packages. Some other frameworks create one monolithic .js file that holds everything, but this is not our way. The advantage of this approach is that you can load only those parts of JSX Toolkit (and your packages) that the page actually needs. This saves bandwidth, and of course, user frustration with slowly loading pages.
|
|
|
|
|
|
So, let's get started.
|
|
So, let's get started.
|
Line 60: |
|
</nowiki></pre>
|
|
</nowiki></pre>
|
|
|
|
|
- |
The jsxClass that was created is going to live inside the <code>myapp.mypackage.MyClass</code> namespace. The <code>MyClass</code> class is an <code>EventHandler</code>, it hooks up to the JSX event routing engine and will receive events that are destined for an element we are going to attach it to.
|
+ |
The jsxClass that was created is going to live inside the <code>myapp.mypackage.MyClass</code> namespace. The <code>MyClass</code> class is an <code>EventHandler</code>, it hooks up to the JSX event routing engine.
|
|
|
|
|
|
|
+ |
Now, to get MyClass up and running, add a button and instantiate the class like below.
|
|
|
+ |
|
|
<pre><nowiki>
|
|
<pre><nowiki>
|
|
<html>
|
|
<html>
|
Line 67: |
- |
<script type="text/javascript">var jsxContext='.'; var jsxLogLevel='INFO';</script>
|
+ |
<script type="text/javascript">var jsxContext='.'; var logLevel='INFO';</script>
|
|
<script type="text/javascript" src="./jsx/core.jsx">
|
|
<script type="text/javascript" src="./jsx/core.jsx">
|
|
</head>
|
|
</head>
|