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

Contents of /www/test/html/script/xmlevents/script-observer-1.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>observer ~ &lt;script ev:observer=""&gt;</title>
6     </head>
7     <body>
8     <h1><var>observer</var> ~ <code>&lt;script ev:observer=""&gt;</code></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     <p>Is a <code>&lt;script ev:event="" ev:observer=""&gt;</code>
15     executed when <button id="button">an event is dispatched</button>?
16     <em id="invoked">not yet</em></p>
17    
18     <script type="text/javascript">
19     window.Loading = true;
20     document.getElementById ('executed').textContent = 'No';
21     </script>
22    
23     <script type="text/javascript" ev:event="click" ev:observer="button">
24     if (window.Loading) {
25     document.getElementById ('executed').textContent = 'Yes';
26     } else {
27     document.getElementById ('invoked').textContent = 'PASS';
28     }
29     </script>
30    
31     <script type="text/javascript">
32     window.Loading = false;
33     </script>
34    
35     </body>
36     </html>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24