<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end>  
The <dfn xml:lang="en">Live <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><abbr xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">CSSOM<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Cascading Style Sheets Object Model</title></abbr></anchor> Viewer</dfn>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://manakai.github.io/livecssomviewer/">https://manakai.github.io/livecssomviewer/</anchor-external>
visualizes how Web browsers interpret CSS
style sheets and expose them into their object hierarchy.</p><section><h1>Description</h1><section><h1>Style sheet to test</h1><p>The CSS style sheet to test.  As you input something to this box,
the following boxes are updated automatically.</p></section><section><h1><abbr xml:lang="en">CSSOM<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Cascading Style Sheets Object Model</title></abbr> View</h1><p>This box shows the object hierarchy of the 
<abbr xml:lang="en">CSSOM<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Cascading Style Sheets Object Model</title></abbr> created
from the style sheet input to the first box.</p><p>Since <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">WinIE</anchor> implements their own object model, 
what is shown in this box in <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">WinIE</anchor> is slight
different from those in other browsers.</p></section><section><h1><code class="DOMa" xml:lang="en">cssText</code> View</h1><p>This box shows the textual serialization of 
the CSS style sheet once parsed by the browser.</p><p>Browsers other than <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">WinIE</anchor>, i.e. browsers implementing only
the standard <abbr xml:lang="en">CSSOM<title xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">Cascading Style Sheets Object Model</title></abbr>,
have no method to serialize the entire style sheet.
For such browsers the <code class="DOMa" xml:lang="en">cssText</code> field
shows the concatenation of <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">cssText</anchor></code>
values for the rules contained in the 
<code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">cssRules</anchor></code> list of the style sheet.</p></section><section><h1>Rendered document view</h1><p>An HTML document is rendered in this box with the specified 
CSS style sheet.</p></section><section><h1>HTML body fragment to test</h1><p>Input the <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">body</anchor></code> part of the HTML document
rendered in the box above.  Any HTML construct can be used.
Note, however, that the value is set to the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">innerHTML</anchor></code> attribute
of the <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">body</anchor></code> element of the rendered
document, therefore any <code class="HTMLe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">script</anchor></code> element
in the fragment is not executed.</p><p>Following the box, there are three radio buttons:
<q xml:lang="en">no quirks</q>, <q xml:lang="en">limited quirks</q>, and <q xml:lang="en">quirks</q>.
These buttons select how HTML documents are parsed and
how CSS style sheets are interpreted.</p></section><section><h1>Log</h1><p>This box shows any message generated for the ease of testing.
The script puts a JavaScript function <code class="JS" xml:lang="en">w (<var xml:lang="en">s</var>)</code>
into the global scope of the rendered document, where <var xml:lang="en">s</var>
is the string to output to the box.  You can invoke the function
in the rendered HTML document or CSS style sheet.</p><p><strong>Warning</strong>. Invoking the function <code class="JS" xml:lang="en">w (<var xml:lang="en">s</var>)</code>
in the CSS function <code class="CSS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">expression</anchor>()</code> might make
IE unstable.</p></section></section><section><h1>External resource</h1><p>A file <code class="URI" xml:lang="en">image</code> (a PNG image) is accessible in the same
directory as the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Live CSSOM Viewer</anchor>.  It can be used for testing.</p></section><section><h1>Tested browsers</h1><ul><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> 2</li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Opera</anchor> 9</li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">WinIE</anchor> 6 (on <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Windows XP</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SP2</anchor>)</li></ul></section><section><h1>Repository</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> There is the Git repository for the Live CSSOM Viewer, available at the following locations:<refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <cite xml:lang="en">manakai/livecssomviewer</cite> (<time>2015-08-10 15:11:57 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/manakai/livecssomviewer">https://github.com/manakai/livecssomviewer</anchor-external></li></ul></refs></p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> Old repositories:<refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li>GitHub <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/wakaba/livecssomviewer">https://github.com/wakaba/livecssomviewer</anchor-external></li><li>Suika server <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://suika.suikawiki.org/gate/git/wi/web/livecssomviewer.git/tree">http://suika.suikawiki.org/gate/git/wi/web/livecssomviewer.git/tree</anchor-external></li></ul></refs></comment-p></section><section><h1>TODOs</h1><ul><li>Alternate parsing mode, such as style=&quot;&quot;, cssText = &quot;&quot;</li></ul></section><section><h1>Author</h1><p><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Wakaba</anchor> &lt;wakaba@suikawiki.org&gt;.</p></section><section><h1>Acknowledgements</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> It is obviously inspired by <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Ian Hickson</anchor>'s <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Live DOM Viewer</anchor>
for HTML documents.</p></section><section><h1>License</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> See the relevant files.</p><delete xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><p xmlns="http://www.w3.org/1999/xhtml">Copyright 2007 Wakaba &lt;wakaba@suikawiki.org&gt;.</p><p xmlns="http://www.w3.org/1999/xhtml">This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.</p><p xmlns="http://www.w3.org/1999/xhtml">This program is distributed in the hope that it will be useful,
but <strong>WITHOUT ANY WARRANTY</strong>; without even the implied warranty of
<strong>MERCHANTABILITY</strong> or <strong>FITNESS FOR A PARTICULAR PURPOSE</strong>.  See the
GNU General Public License for more details.</p><p xmlns="http://www.w3.org/1999/xhtml">You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.</p></delete></section><section><h1>memo</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end>
An example to test <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">CSSOM</anchor> attributes using
functions <code class="JS" xml:lang="en">sd()</code> and <code class="JS" xml:lang="en">u()</code>:
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://suika.suikawiki.org/gate/2007/cssom/viewer?c=p%7B%7D;h=%3Cinput%20type%3Dbutton%20value%3Dx%20onclick%3D%22%0A%20%20try%20%7B%0A%20%20%20%20sd%20().border%20%3D%20'2px%20solid%20blue'%3B%0A%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20w%20(e.message%20%7C%7C%20e)%3B%0A%20%20%7D%0A%20%20u%20()%3B%0A%22%3E%0A%0A%3Cp%3EXXXXX%3C%2Fp%3E;p=n;x=style-element">http://suika.suikawiki.org/gate/2007/cssom/viewer?c=p%7B%7D;h=%3Cinput%20type%3Dbutton%20value%3Dx%20onclick%3D%22%0A%20%20try%20%7B%0A%20%20%20%20sd%20().border%20%3D%20'2px%20solid%20blue'%3B%0A%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20w%20(e.message%20%7C%7C%20e)%3B%0A%20%20%7D%0A%20%20u%20()%3B%0A%22%3E%0A%0A%3Cp%3EXXXXX%3C%2Fp%3E;p=n;x=style-element</anchor-external>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor>)</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end>
It now supports the XML parse mode:
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://suika.suikawiki.org/gate/2007/cssom/viewer?c=p%20%7Bcolor%3A%20green%7D%0AP%20%7Bcolor%3A%20red%7D;h=%3Cp%3Esmall%20%26lt%3Bp%3E%3C%2Fp%3E%0A%3CP%3ECAPITAL%20%26lt%3BP%3E%3C%2FP%3E;p=x;x=style-element">http://suika.suikawiki.org/gate/2007/cssom/viewer?c=p%20%7Bcolor%3A%20green%7D%0AP%20%7Bcolor%3A%20red%7D;h=%3Cp%3Esmall%20%26lt%3Bp%3E%3C%2Fp%3E%0A%3CP%3ECAPITAL%20%26lt%3BP%3E%3C%2FP%3E;p=x;x=style-element</anchor-external></p><p>(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor> <weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">2008-01-13 13:09:06 +00:00</weak>)</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end>
<strong>NOTE</strong>: In Opera 9.52, the <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">cssText</anchor></code> attribute does not return
the reserialized form of the CSSOM object for the <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML</anchor> or <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SVG</anchor>
<code class="XMLa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">style</anchor></code> attributes.  For more information, see
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://suika.suikawiki.org/gate/2005/sw/style#anchor-81">http://suika.suikawiki.org/gate/2005/sw/style#anchor-81</anchor-external>.</p></section></body></html>