Parent Directory
|
Revision Log
|
Patch
| revision 1.7 by wakaba, Fri Apr 25 23:03:35 2008 UTC | revision 1.10 by wakaba, Sun Apr 27 10:34:18 2008 UTC | |
|---|---|---|
| # | Line 1 | Line 1 |
| 1 | <!DOCTYPE HTML> | <!DOCTYPE HTML> |
| 2 | <html lang=en> | <html lang=en> |
| 3 | <head> | <head> |
| 4 | <title>Demo of HTML5 Parsing Algorithm with Scripting Enabled</title> | <title>Live Scripting HTML Parser</title> |
| 5 | <style> | <style> |
| 6 | h1, h2 { | h1, h2 { |
| 7 | margin: 0; | margin: 0; |
| # | Line 34 | Line 34 |
| 34 | } // update | } // update |
| 35 | ||
| 36 | function update2 () { | function update2 () { |
| document.logElement.textContent = ''; | ||
| 37 | var v = document.sourceElement.value; | var v = document.sourceElement.value; |
| 38 | var p = new Parser (new InputStream (v)); | if (v != document.previousSourceText) { |
| 39 | var doc = p.doc; | document.previousSourceText = v; |
| 40 | p.parse (); | document.links['permalink'].href |
| 41 | log (dumpTree (doc, '')); | = location.pathname + '?s=' + encodeURIComponent (v); |