<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Introducing: JSHTML</title>
	<atom:link href="http://james.padolsey.com/javascript/introducing-jshtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com/javascript/introducing-jshtml/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 08 Mar 2010 01:21:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mike</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-22415</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Sat, 17 Oct 2009 14:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-22415</guid>
		<description>I think this has potential.  Keep up the good work James :D.
If you do take this further with the templating idea - Smarty for php might be a good idea to take a look at. It&#039;s a fairly well done (imo) template library for php, some features might be adoptable from it.</description>
		<content:encoded><![CDATA[<p>I think this has potential.  Keep up the good work James <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .<br />
If you do take this further with the templating idea &#8211; Smarty for php might be a good idea to take a look at. It&#8217;s a fairly well done (imo) template library for php, some features might be adoptable from it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-21291</link>
		<dc:creator>Kris</dc:creator>
		<pubDate>Tue, 29 Sep 2009 20:34:51 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-21291</guid>
		<description>Think of the CSS implications of this.  Properties that do not validate or are not consistent between browsers could be expressed in this way.  Examples would include border-radius and opacity.</description>
		<content:encoded><![CDATA[<p>Think of the CSS implications of this.  Properties that do not validate or are not consistent between browsers could be expressed in this way.  Examples would include border-radius and opacity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stijn</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-17643</link>
		<dc:creator>Stijn</dc:creator>
		<pubDate>Wed, 05 Aug 2009 09:27:49 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-17643</guid>
		<description>Found a solution (should have more confidence in myself :-). If you use the createComment() method, everything works just fine!

&lt;code&gt;
x = document.createComment(&#039;JSHTML test&#039;);
document.body.appendChild(x);
JSHTML.parse();
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Found a solution (should have more confidence in myself <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . If you use the createComment() method, everything works just fine!</p>
<p><code><br />
x = document.createComment('JSHTML test');<br />
document.body.appendChild(x);<br />
JSHTML.parse();<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stijn</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-17642</link>
		<dc:creator>Stijn</dc:creator>
		<pubDate>Wed, 05 Aug 2009 09:20:17 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-17642</guid>
		<description>This is a great feature you&#039;re introducing here (to me anyway :-).

But I was wondering if it&#039;s possible to create new HTML comments in the DOM, and parse them afterwards with JSHTML. I was trying to generate comments with jquery with the &#039;after&#039; method and perform the parsing, but with no result:

&lt;code&gt;
 JSHTML.config.delimiters = [&#039;&#039;,&#039;&#039;];
 $(&#039;#foo&#039;).after(&#039;&lt;!-- JSHTML bar --&gt;&#039;);
 JSHTML.parse();
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>This is a great feature you&#8217;re introducing here (to me anyway <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>But I was wondering if it&#8217;s possible to create new HTML comments in the DOM, and parse them afterwards with JSHTML. I was trying to generate comments with jquery with the &#8216;after&#8217; method and perform the parsing, but with no result:</p>
<p><code><br />
 JSHTML.config.delimiters = ['',''];<br />
 $('#foo').after('&lt;!-- JSHTML bar --&gt;');<br />
 JSHTML.parse();<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LX</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-10674</link>
		<dc:creator>LX</dc:creator>
		<pubDate>Mon, 27 Apr 2009 16:16:33 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-10674</guid>
		<description>One of the most used techniques is putting a script tag first into body which adds the class &quot;jsEnabled&quot; to the body tag and use CSS to hide/show those elements which should only be shown if JavaScript is enabled.

About your example: this is one of the reasons people choose to use the appendDom-Plugin - but it is far from being more readable. Yet, if you want readability, just use multiple strings, like in:

&lt;pre lang=&quot;javascript&quot;&gt;
$(&#039;(div id=&quot;whatever&quot;)&#039;+
      &#039;(a href=&quot;#mylink&quot;)some Link(/a)&#039;+
  &#039;(/div)&#039;);
&lt;/pre&gt;

Sorry for the brackets, but the formatter seems to be erroneous; please replace them with HTML code. Anyway: Marvellous how the code is readable now, isn&#039;t it? And you don&#039;t have to waste as much time parsing the whole page for comments and DOM rebuilding.

Greetings, LX</description>
		<content:encoded><![CDATA[<p>One of the most used techniques is putting a script tag first into body which adds the class &#8220;jsEnabled&#8221; to the body tag and use CSS to hide/show those elements which should only be shown if JavaScript is enabled.</p>
<p>About your example: this is one of the reasons people choose to use the appendDom-Plugin &#8211; but it is far from being more readable. Yet, if you want readability, just use multiple strings, like in:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span><span class="st0">'(div id=&quot;whatever&quot;)'</span><span class="sy0">+</span>
      <span class="st0">'(a href=&quot;#mylink&quot;)some Link(/a)'</span><span class="sy0">+</span>
  <span class="st0">'(/div)'</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>Sorry for the brackets, but the formatter seems to be erroneous; please replace them with HTML code. Anyway: Marvellous how the code is readable now, isn&#8217;t it? And you don&#8217;t have to waste as much time parsing the whole page for comments and DOM rebuilding.</p>
<p>Greetings, LX</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ken</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-10212</link>
		<dc:creator>ken</dc:creator>
		<pubDate>Fri, 17 Apr 2009 19:20:58 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-10212</guid>
		<description>This is interesting, but I don&#039;t find it particularly useful in its current state, it just seems really limited in what it can do. I am still leaning towards Resig&#039;s &quot;micro-templating&quot; approach, as demonstrated here:

http://ejohn.org/blog/javascript-micro-templating/</description>
		<content:encoded><![CDATA[<p>This is interesting, but I don&#8217;t find it particularly useful in its current state, it just seems really limited in what it can do. I am still leaning towards Resig&#8217;s &#8220;micro-templating&#8221; approach, as demonstrated here:</p>
<p><a href="http://ejohn.org/blog/javascript-micro-templating/">http://ejohn.org/blog/javascript-micro-templating/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xrado</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-10072</link>
		<dc:creator>xrado</dc:creator>
		<pubDate>Thu, 16 Apr 2009 11:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-10072</guid>
		<description>..and Domplate used in/by firebug i think

http://www.christophdorn.com/Blog/2008/09/07/domplate-debug-logging/</description>
		<content:encoded><![CDATA[<p>..and Domplate used in/by firebug i think</p>
<p><a href="http://www.christophdorn.com/Blog/2008/09/07/domplate-debug-logging/">http://www.christophdorn.com/Blog/2008/09/07/domplate-debug-logging/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-10026</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Wed, 15 Apr 2009 19:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-10026</guid>
		<description>Nice work, but in principle something like this has been around for a long time. I think the Trimpath template is a similar concept, no? 

If my memory serves me right, in the case of Trimpath the templates are tucked away in hidden textareas and not in comments.

http://code.google.com/p/trimpath/wiki/JavaScriptTemplates</description>
		<content:encoded><![CDATA[<p>Nice work, but in principle something like this has been around for a long time. I think the Trimpath template is a similar concept, no? </p>
<p>If my memory serves me right, in the case of Trimpath the templates are tucked away in hidden textareas and not in comments.</p>
<p><a href="http://code.google.com/p/trimpath/wiki/JavaScriptTemplates">http://code.google.com/p/trimpath/wiki/JavaScriptTemplates</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toby Miller</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-10013</link>
		<dc:creator>Toby Miller</dc:creator>
		<pubDate>Wed, 15 Apr 2009 16:39:53 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-10013</guid>
		<description>Excellent Job James! I did something similar to this in MooTools last year. The biggest difference in your implementation and mine (aside from using MooTools vs jQuery) is that I&#039;m allowing for the hidden comment to contain a Hash object rather than just HTML content. This Hash object can then be used to extend the element that the comment is a direct child of. The advantage to this route is that you are not restricted to only extending HTML markup. You can extend events, classes, styles, properties, attributes, text and html.

You can see it generally described and used here:
http://www.tobymiller.com/articles/mootools_enhanced_elements/index.php

Maybe you could adopt some of these additional features into your solution. My primary need for this is to support web page features that need to work regardless of the presence of JavaScript (i.e. screen readers, search engines, locked down corporate environments, etc). You can really do a lot of cool things with this methodology.</description>
		<content:encoded><![CDATA[<p>Excellent Job James! I did something similar to this in MooTools last year. The biggest difference in your implementation and mine (aside from using MooTools vs jQuery) is that I&#8217;m allowing for the hidden comment to contain a Hash object rather than just HTML content. This Hash object can then be used to extend the element that the comment is a direct child of. The advantage to this route is that you are not restricted to only extending HTML markup. You can extend events, classes, styles, properties, attributes, text and html.</p>
<p>You can see it generally described and used here:<br />
<a href="http://www.tobymiller.com/articles/mootools_enhanced_elements/index.php">http://www.tobymiller.com/articles/mootools_enhanced_elements/index.php</a></p>
<p>Maybe you could adopt some of these additional features into your solution. My primary need for this is to support web page features that need to work regardless of the presence of JavaScript (i.e. screen readers, search engines, locked down corporate environments, etc). You can really do a lot of cool things with this methodology.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeethu Rao</title>
		<link>http://james.padolsey.com/javascript/introducing-jshtml/comment-page-1/#comment-10010</link>
		<dc:creator>Jeethu Rao</dc:creator>
		<pubDate>Wed, 15 Apr 2009 16:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=749#comment-10010</guid>
		<description>@Robert Samuel Clay: You should look at &lt;a href=&quot;http://mochikit.com/doc/html/MochiKit/DOM.html&quot; rel=&quot;nofollow&quot;&gt;Mochikit.DOM&lt;/a&gt; and probably my YUI &lt;a href=&quot;http://jeethurao.com/blog/?p=156&quot; rel=&quot;nofollow&quot;&gt;port&lt;/a&gt; of the same for a cleaner (IMO, since it involves less typing) way to do the same.</description>
		<content:encoded><![CDATA[<p>@Robert Samuel Clay: You should look at <a href="http://mochikit.com/doc/html/MochiKit/DOM.html">Mochikit.DOM</a> and probably my YUI <a href="http://jeethurao.com/blog/?p=156">port</a> of the same for a cleaner (IMO, since it involves less typing) way to do the same.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
