--- a/demo.xhtml Fri Mar 12 02:32:39 2010 -0600
+++ b/demo.xhtml Fri Mar 12 02:43:02 2010 -0600
@@ -3,18 +3,20 @@
<head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<title>Demo JSCSSP</title>
+ <style type="text/css">@charset 'iso-8859-1';
+@media screen,projection,print {/* comment inside a media rule */pre { background-color: #FFFFCC;
+/* comment between two declarations */<a ></a>border: 2px silver solid; padding: 1em; -moz-border-radius: 11px;
+-webkit-border-radius:11px}
+body { font-family: sans-serif; margin: 1em }
+/* comment between two style rules */
+h1 { background-color: silver }
+h2 { background-color: lightgrey }
+h1, h2 { margin: 0px; padding: 4px }}
+ </style>
<script type="application/x-javascript" src="cssParser.js"></script>
<script type="application/x-javascript">
function onLoad() {
- var ss = "@charset 'iso-8859-1';\n\
-@media screen,projection,print {/* comment inside a media rule */pre { background-color: #FFFFCC;\n\
-/* comment between two declarations */<a ></a>border: 2px silver solid; padding: 1em; -moz-border-radius: 11px;\n\
--webkit-border-radius:11px}\n\
-body { font-family: sans-serif; margin: 1em }\n\
-/* comment between two style rules */\n\
-h1 { background-color: silver }\n\
-h2 { background-color: lightgrey }\n\
-h1, h2 { margin: 0px; padding: 4px }}";
+ var ss = document.styleSheets.item(0).ownerNode.textContent;
var source = document.getElementById("source");
source.textContent = ss;
var style = document.createElement("style");