<?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: Javascript Element Creator</title>
	<atom:link href="http://www.algorithm.co.il/blogs/programming/javascript-element-creator/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.algorithm.co.il/blogs/programming/javascript-element-creator/</link>
	<description>Algorithms, for the heck of it</description>
	<lastBuildDate>Tue, 21 Jun 2011 21:07:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: lorg</title>
		<link>http://www.algorithm.co.il/blogs/programming/javascript-element-creator/#comment-296</link>
		<dc:creator>lorg</dc:creator>
		<pubDate>Sun, 21 Mar 2010 11:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=542#comment-296</guid>
		<description>Ilan:
1. Yes, I make it invisble with css. I don&#039;t really like templates in the JS code. On the contrary, I prefer it in the html, with other similar code (in purpose and in form).

2. I didn&#039;t say that innerHTML is slower than cloneNode. They are mostly equivalent although cloneNode
is somewhat faster in a test I ran right now (on firefox). Still, they are both much faster than createElement, which was my actual point.

3. Various reasons, including historical ones. Among other things, the trip&#039;s presentation is more complicated than plain html, and has a lot of events and behaviors attached to it. I guess I could do it that way, but I see no clear advantage at the moment.

Details &amp; urls: what do you want to see?

And indeed, see you Monday! :)</description>
		<content:encoded><![CDATA[<p>Ilan:<br />
1. Yes, I make it invisble with css. I don&#8217;t really like templates in the JS code. On the contrary, I prefer it in the html, with other similar code (in purpose and in form).</p>
<p>2. I didn&#8217;t say that innerHTML is slower than cloneNode. They are mostly equivalent although cloneNode<br />
is somewhat faster in a test I ran right now (on firefox). Still, they are both much faster than createElement, which was my actual point.</p>
<p>3. Various reasons, including historical ones. Among other things, the trip&#8217;s presentation is more complicated than plain html, and has a lot of events and behaviors attached to it. I guess I could do it that way, but I see no clear advantage at the moment.</p>
<p>Details &#038; urls: what do you want to see?</p>
<p>And indeed, see you Monday! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilan</title>
		<link>http://www.algorithm.co.il/blogs/programming/javascript-element-creator/#comment-295</link>
		<dc:creator>Ilan</dc:creator>
		<pubDate>Fri, 19 Mar 2010 21:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.algorithm.co.il/blogs/?p=542#comment-295</guid>
		<description>Peace, I &amp; B! ;o)

I&#039;m curious:

1. I don&#039;t like it that the template is in the DOM, and presumably you make it invisible with CSS? What about progressive enhancement (or unobtrusive JS ;-)? Ugh. If it&#039;s not a fragment of the document you&#039;re &quot;adding more of&quot;, well, then put the template in a the JS, as a string constant (literal), and interpolate somehow (jQuery?), hmm?

2. innerHTML slower than cloneNode?! Hmm, Googling (lots; want my bookmarks?) would suggest that&#039;s debatable. How deep the fragment you&#039;re cloning? Can we see the code?

3. Your back-end returns the &quot;new trip&quot; in JSON? Why not HTML so you won&#039;t have to render nothing client-side?

I&#039;d love to see more details/URLs, if you can afford any?

(Anyway, see you Monday! ;o)</description>
		<content:encoded><![CDATA[<p>Peace, I &amp; B! ;o)</p>
<p>I&#8217;m curious:</p>
<p>1. I don&#8217;t like it that the template is in the DOM, and presumably you make it invisible with CSS? What about progressive enhancement (or unobtrusive JS ;-)? Ugh. If it&#8217;s not a fragment of the document you&#8217;re &#8220;adding more of&#8221;, well, then put the template in a the JS, as a string constant (literal), and interpolate somehow (jQuery?), hmm?</p>
<p>2. innerHTML slower than cloneNode?! Hmm, Googling (lots; want my bookmarks?) would suggest that&#8217;s debatable. How deep the fragment you&#8217;re cloning? Can we see the code?</p>
<p>3. Your back-end returns the &#8220;new trip&#8221; in JSON? Why not HTML so you won&#8217;t have to render nothing client-side?</p>
<p>I&#8217;d love to see more details/URLs, if you can afford any?</p>
<p>(Anyway, see you Monday! ;o)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

