/[suikacvs]/www/test/dom/window/doc/set-document-1.html
Suika

Diff of /www/test/dom/window/doc/set-document-1.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Sun Jan 13 05:38:56 2008 UTC revision 1.3 by wakaba, Sun Jan 13 05:57:25 2008 UTC
# Line 11  Line 11 
11  </script>  </script>
12    
13  <p><input type=button value=setDocument onclick="  <p><input type=button value=setDocument onclick="
14      window.olddoc = document;
15    var doc = document.implementation.createDocument    var doc = document.implementation.createDocument
16        ('http://www.w3.org/1999/xhtml', 'html', null);        ('http://www.w3.org/1999/xhtml', 'html', null);
17    var html = doc.documentElement;    var html = doc.documentElement;
# Line 20  Line 21 
21    var body = html.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'body'));    var body = html.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'body'));
22    body.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'p'))    body.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'p'))
23        .textContent = 'New document.';        .textContent = 'New document.';
24      body.onload = &quot;document.getElementById ('atonload').textContent += '\nonload: ' + new Date ();&quot;;
25    var button = body.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'p'))    var button = body.appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'p'))
26        .appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'button'));        .appendChild (doc.createElementNS ('http://www.w3.org/1999/xhtml', 'button'));
27    button.textContent = 'alert (window.xxxxx)';    button.textContent = 'alert (window.xxxxx)';
28    button.onclick = 'alert (window.xxxxx)';    button.onclick = 'alert (window.xxxxx)';
29      body.appendChild (document.createElementNS ('http://www.w3.org/1999/xhtml', 'pre'))
30          .setAttributeNS (null, 'id', 'atonload');
31    setDocument (doc);    setDocument (doc);
32  "></p>  "></p>
33    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24