/[suikacvs]/www/test/html/head/head-by-script-and-parser-3.html.cgi
Suika

Contents of /www/test/html/head/head-by-script-and-parser-3.html.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Nov 13 05:33:14 2010 UTC (15 years, 2 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
New tests; see <http://suika.fam.cx/%7Ewakaba/wiki/sw/n/HTML%E3%81%AE%E3%83%AC%E3%83%B3%E3%83%80%E3%83%AA%E3%83%B3%E3%82%B0%E3%81%AE%E9%96%8B%E5%A7%8B> for results

1 wakaba 1.1 #!/usr/bin/perl
2     use strict;
3     use warnings;
4    
5     $| = 1;
6    
7     # 0s
8    
9     sleep 2;
10    
11     # 2s
12     print qq[Content-Type: text/html; charset=utf-8\n\n];
13    
14     sleep 2;
15    
16     # 4s
17     print q[ ];
18    
19     sleep 2;
20    
21     # 6s
22     print q[<!DOCTYPE HTML>];
23    
24     sleep 2;
25    
26     # 8s
27     print q[<html style="border: blue 0.5em solid; padding: 0.5em; cursor: pointer"
28     onclick="
29     var head = document.createElement ('head');
30     head.setAttribute ('style', 'border: orange 0.5em solid; padding: 0.5em; display: block; margin: 0.5em');
31     head.setAttribute ('data-source', 'html/\@onclick');
32     document.documentElement.appendChild (head);
33     ">];
34    
35     sleep 2;
36    
37     # 10s
38     print qq[<head data-source="html/head" style="border: blue 0.5em solid; padding: 0.5em; display: block; margin: 0.5em">];
39    
40     sleep 2;
41    
42     # 12s
43     print q[<body style="border: blue 0.5em solid; padding: 0.5em; margin: 0.5em">];
44    
45     sleep 2;
46    
47     # 14s
48     print q[<p><a href="javascript:alert (document.innerHTML || document.documentElement.outerHTML || document.documentElement.innerHTML)">Check DOM of this page!</a>];
49    
50     print q[<p>] . rand;

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24