/[suikacvs]/www/test/html/script/xmlevents/script-observer-2.xhtml
Suika

Contents of /www/test/html/script/xmlevents/script-observer-2.xhtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Oct 21 07:22:01 2006 UTC (18 years, 8 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
New

1 wakaba 1.1 <html xmlns="http://www.w3.org/1999/xhtml"
2     xmlns:ev="http://www.w3.org/2001/xml-events"
3     xml:lang="en">
4     <head>
5     <title>&lt;script ev:observer=""&gt; ~ observer</title>
6     </head>
7     <body>
8     <h1><code>&lt;script ev:observer=""&gt;</code> ~ <var>observer</var></h1>
9    
10     <p>Is a <code>&lt;script ev:event="" ev:observer=""&gt;</code>
11     executed during loading the document?
12     <em id="executed">FAIL</em></p>
13    
14     <script type="text/javascript">
15     window.Loading = true;
16     document.getElementById ('executed').textContent = 'No';
17     </script>
18    
19     <script type="text/javascript" ev:event="click" ev:observer="button">
20     if (window.Loading) {
21     document.getElementById ('executed').textContent = 'Yes';
22     } else {
23     document.getElementById ('invoked').textContent = 'PASS';
24     }
25     </script>
26    
27     <script type="text/javascript">
28     window.Loading = false;
29     </script>
30    
31     <p>Is a <code>&lt;script ev:event="" ev:observer=""&gt;</code>
32     executed when <button id="button">an event is dispatched</button>?
33     <em id="invoked">not yet</em></p>
34    
35     </body>
36     </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24