<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tiffany B. Brown &#187; JavaScript/ECMAScript</title>
	<atom:link href="http://tiffanybbrown.com/category/javascriptecmascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://tiffanybbrown.com</link>
	<description>A web log about web development and internet culture with frequent detours into other stuff.</description>
	<lastBuildDate>Wed, 23 May 2012 16:23:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>HTML5 for AS3 Developers: FormData versus URLVariables</title>
		<link>http://tiffanybbrown.com/2011/10/31/html5-for-as3-developers-formdata-versus-urlvariables/</link>
		<comments>http://tiffanybbrown.com/2011/10/31/html5-for-as3-developers-formdata-versus-urlvariables/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 10:00:00 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[DOM]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[html5foras3devs]]></category>
		<category><![CDATA[xhr]]></category>
		<category><![CDATA[xhr2]]></category>
		<category><![CDATA[xmlhttprequest]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6482</guid>
		<description><![CDATA[This is the third post in an occasional series designed to bridge the gap between ActionScript 3.0 and emerging front-end technologies. Both ActionScript and the front-end stack have mechanisms for sending data from a page or movie to a server without requiring a page refresh. In most browsers, we can use the XMLHttpRequest object. In [...]]]></description>
			<content:encoded><![CDATA[<p class="editors-note">This is the <a href="http://tiffanybbrown.com/tag/html5foras3devs">third post</a> in an occasional series designed to bridge the gap between ActionScript 3.0 and emerging front-end technologies.</p>
<p>Both ActionScript and the front-end stack have mechanisms for sending data from a page or movie to a server without requiring a page refresh. In most browsers, we can use the <code>XMLHttpRequest</code>  object. In Flash, that role is filled by a combination of the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequest.html">URLRequest</a>, <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLVariables.html">URLVariables</a>, and <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLLoader.html">URLLoader</a> classes. </p>
<p>I know you&#8217;re probably thinking &#8220;Why are you writing about this now? XMLHttpRequest has been around for more than half a decade!&#8221; True, but <a href="http://www.w3.org/TR/XMLHttpRequest2/">XMLHttpRequest, Level 2</a> (XHR2) is still an emerging standard. </p>
<p>XHR2 is a huge expansion of the <a href="http://www.w3.org/TR/XMLHttpRequest/"><code>XMLHttpRequest</code> <abbr title="Application Programming Interface">API</abbr></a>. It adds several new features &#8212; such as progress events, binary data, and <a href="http://tiffanybbrown.com/2011/10/10/html5-for-as3-developers-cross-domain-xml-and-cross-origin-resource-sharing/">cross-origin requests</a> &#8212; and brings much of what Flash currently does to the browser natively.</p>
<p>In this post, I will give a quick rundown of sending basic text data using URLVariables, URLRequest, and URLLoader and how it compares to the new <a href="http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#interface-formdata"><code>FormData</code> interface</a>. In a future post, we&#8217;ll look at sending files and binary data using both techniques.</p>
<h2>Sending data with <code>URLVariables</code></h2>
<p>The example below is one you might create using FlashBuilder to create a Flash movie programmatically. The <code>flash.display.Sprite</code> class is imported by default. Since we&#8217;re going to make network requests, we will also import all <code>flash.net.*</code> classes.</p>
<pre>
package
{
	import flash.display.Sprite; // imported by default
	import flash.net.* // imports URL classes

	public class URLVars extends Sprite
	{
		public function URLVars()
		{
			/* create a new URLRequest object */
			var req:URLRequest = new URLRequest();

			/* create a new URLVariables object */
			var dataObj:URLVariables = new URLVariables();

			/* Create a new URLLoader */
			var fxhr:URLLoader = new URLLoader();

			/* Add object property-value pairs */
			dataObj.name = 'Jane Doe';
			dataObj.address = '1313 Mockingbird Lane';
			dataObj.City = 'Beverly Hills';
			dataObj.State = 'CA';
			dataObj.ZIP = '90210';
			dataObj.Country = 'United States';

			/* define the URL for the request */
			req.url = '/script';

			/* Set the request method. */
			req.method = URLRequestMethod.POST;

			/* Attach the data object to the request */
			req.data = dataObj;

			/* Make the request */
			fxhr.load(req);

		}
	}
}
</pre>
<p>When this request is made, the Flash user agent will automatically include a <code>Content-Type: application/x-www-form-urlencoded</code> request header since all of the fields included are plain text. If one of the included fields had been a file (using the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html">FileReference</a> or <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReferenceList.html">FileReferenceList</a> classes), Flash would instead send a <code>Content-Type: multipart/form-data</code> header. </p>
<h2>Sending data with a <code>FormData</code> object</h2>
<p>Now let&#8217;s take a look at sending that same data using a <code>FormData</code> object.</p>
<pre>
/*
Create a new FormData object. This is
analogous to the URLVariables() object
*/
var data = new FormData();

/* Append each field as key, value */
data.append('Name','Jane Doe');
data.append('Address','1313 Mockingbird Lane');
data.append('City','Beverly Hills');
data.append('State','CA');
data.append('ZIP','90210');
data.append('Country','United States');

/*
Create a new XMLHttpRequest object,
which is analogous to the URLRequest object.
*/
var xhr = new XMLHttpRequest();

/* Open the connection, and set the method. */
xhr.open('POST','/script');

/*
Send the data. Roughly equivalent
to fxhr.load( req );
*/
xhr.send( data );
</pre>
<p>Notice again here that we are not setting a <code>Content-Type</code> request header as we would have to with XHR1. When you use a <code>FormData</code> object to send data, the browser will automatically include a <code>Content-Type: multipart/form-data</code> header. This is also why and how we can now (well, we will soon be able to) use <code>XMLHttpRequest</code> to send binary data and files.</p>
<h2>Browser support</h2>
<p>Browser support for XHR2 isn&#8217;t as far along as we&#8217;d like. Chrome and Firefox support most of the specification. At Opera, our development team is diligently working to bundle support into a future release. Microsoft plans to include support in Internet Explorer 10 scheduled for a 2012 release.</p>
<table class="browsersupport">
<caption>Browser support for XHR2 and <code>FormData</code> as of 31 October 2011</caption>
<tr>
<th>Opera</th>
<th>Opera Mini</th>
<th>Opera Mobile</th>
<th>IE</th>
<th>Firefox</th>
<th>Chrome</th>
<th>Safari</th>
<th>iOS Safari</th>
<th>Android WebKit</th>
</tr>
<tr>
<td class="no center">no</td>
<td class="no center mobile">no</td>
<td class="no center mobile">no</td>
<td class="yes center">10.0+</td>
<td class="yes center">4.0+</td>
<td class="yes center">5.0+</td>
<td class="yes center">5.0+</td>
<td class="yes center mobile">5.0</td>
<td class="yes center mobile">2.1+</td>
</tr>
</table>
<p>In the meantime, we can continue to send text data via XHR using URL-encoded strings. I&#8217;ll take a look at file uploads in an future post.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/10/31/html5-for-as3-developers-formdata-versus-urlvariables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Recommended: &#8220;Dart; or Why JavaScript has already won&#8221;</title>
		<link>http://tiffanybbrown.com/2011/10/12/recommended-dart-or-why-javascript-has-already-won/</link>
		<comments>http://tiffanybbrown.com/2011/10/12/recommended-dart-or-why-javascript-has-already-won/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 20:32:15 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[dart]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google chrome]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6410</guid>
		<description><![CDATA[Peter-Paul Koch writes: Google wants to create a new language for the web. That idea will have to be accepted by all other browser vendors. Nowadays that doesn’t just mean Microsoft, Mozilla, Apple, and Opera, but also Nokia, Samsung, RIM, and a host of minor ones. Why would they do as Google tells them? That&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.quirksmode.org/blog/archives/2011/10/dart_or_why_jav.html">Peter-Paul Koch writes</a>:<br />
<blockquote>Google wants to create a new language for the web. That idea will have to be accepted by all other browser vendors. Nowadays that doesn’t just mean Microsoft, Mozilla, Apple, and Opera, but also Nokia, Samsung, RIM, and a host of minor ones. Why would they do as Google tells them?</p></blockquote>
<p>That&#8217;s his reaction to Google&#8217;s <a href="http://www.dartlang.org/">DART</a> project. Also check out 2ality&#8217;s post <a href="http://www.2ality.com/2011/10/dart-launch.html">which gives an overview of DART</a>.</p>
<p>I pretty much ageree with PPK here. I am sure DART is awesome. I know a lot of smart folks worked on it. But I&#8217;m not convinced the web needs <em>another</em> front-end language, particularly one that is pushed by a single company. Even Adobe&#8217;s cross-platform, ECMAScript 4-compliant ActionScript is rapidly losing ground to the open web. </p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/10/12/recommended-dart-or-why-javascript-has-already-won/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dispatching Custom DOM Events</title>
		<link>http://tiffanybbrown.com/2011/10/12/dispatching-custom-dom-events/</link>
		<comments>http://tiffanybbrown.com/2011/10/12/dispatching-custom-dom-events/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 10:00:41 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[DOM Level 3]]></category>
		<category><![CDATA[event handling]]></category>
		<category><![CDATA[event-driven programming]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6343</guid>
		<description><![CDATA[Apparently while I wasn&#8217;t paying attention, the big four browser vendors (more or less) implemented DOM Level 3 events. And what, exactly, is the big deal about DOM Level 3? Custom DOM events. Custom events are especially important in game development. Let&#8217;s say we were developing Pong using JavaScript. We might fire a bounce event [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently while I wasn&#8217;t paying attention, the big four browser vendors (more or less) implemented <a href="http://www.w3.org/TR/DOM-Level-3-Events/">DOM Level 3</a> events. And what, exactly, is the big deal about DOM Level 3? <strong>Custom DOM events</strong>. </p>
<p>Custom events are especially important in game development. Let&#8217;s say we were developing <a href="http://www.youtube.com/watch?v=LPkUvfL8T1I">Pong</a> using JavaScript. We might fire a <code>bounce</code> event when the ball reaches the side edges of the screen. And we might dispatch an <code>out_of_bounds</code> event if the ball gets past our paddle. Ultimately, they help keep us from misusing native DOM events.</p>
<p>Using custom events requires a shift in thinking about <em>how</em> you architect a game. But they&#8217;re terribly useful, and supported in the latest versions of every modern browser. </p>
<p>How to use? A simple snippet follows:</p>
<p><iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/webinista/pqTDd/embedded/"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/10/12/dispatching-custom-dom-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looping video in browsers that don&#8217;t yet support the loop attribute</title>
		<link>http://tiffanybbrown.com/2011/10/04/looping-video-in-browsers-that-dont-yet-support-the-loop-attribute/</link>
		<comments>http://tiffanybbrown.com/2011/10/04/looping-video-in-browsers-that-dont-yet-support-the-loop-attribute/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 10:00:43 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[Web Development & Programming]]></category>
		<category><![CDATA[DOMScripting]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[html5 video]]></category>
		<category><![CDATA[multimedia]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6314</guid>
		<description><![CDATA[To date, Firefox does not yet support the loop attribute of the &#60;video&#62; element. This snippet is a simple work-around. Once the video&#8217;s ended event is fired, it calls the play method. For more, consult the media events section of the HTML5 specification.]]></description>
			<content:encoded><![CDATA[<p>To date, Firefox does not yet support the <code>loop</code> attribute of the <code>&lt;video&gt;</code> element. This snippet is a simple work-around. Once the video&#8217;s  <code>ended</code> event is fired, it calls the <code>play</code> method.</p>
<p><iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/webinista/eUvrc/embedded/"></iframe></p>
<p>For more, consult the <a href="http://dev.w3.org/html5/spec-author-view/media-elements.html#mediaevents">media events</a> section of the HTML5 specification.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/10/04/looping-video-in-browsers-that-dont-yet-support-the-loop-attribute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing HTML5 for AS3 Developers</title>
		<link>http://tiffanybbrown.com/2011/10/03/introducing-html5-for-as3-developers/</link>
		<comments>http://tiffanybbrown.com/2011/10/03/introducing-html5-for-as3-developers/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 09:00:39 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[html5foras3devs]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6089</guid>
		<description><![CDATA[During my three years at Armchair, I worked on a few ActionScript 3.0 projects. I knew some ActionScript 2.0 when I started, but ActionScript 3.0 was new for me. It is object-oriented and requires event-driven thinking &#8212; two skills frankly, that I am still developing. They&#8217;re also two skills you should be developing, as they&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>During my three years at <a href="http://armchairmedia.com/">Armchair</a>, I worked on a few <a href="http://www.adobe.com/devnet/actionscript.html">ActionScript 3.0</a> projects. I knew some ActionScript 2.0 when I started, but ActionScript 3.0 was new for me. It is object-oriented and requires event-driven thinking &#8212; two skills frankly, that I am still developing. They&#8217;re also two skills <em>you</em> should be developing, as they&#8217;re the present and future of web development.</p>
<p>Now I work almost exclusively with JavaScript, HTML5, CSS, and occasionally SVG. I haven&#8217;t touched ActionScript in any serious way for close to a year. But working on those projects was &#8220;training&#8221; of sorts. And it served me well.</p>
<p>It&#8217;s an open secret that HTML5<a href="#n20111003">*</a> evolved to kill Flash. Many of the features of HTML5 and technologies such as <a href="http://www.w3.org/TR/XMLHttpRequest2/">XMLHttpRequest, Level 2</a> and <a href="http://www.w3.org/TR/cors/">Cross-origin Resource Sharing</a> have parallels in ActionScript 3.0. The front-end stack, in other words, is gunning for Flash. And it will happen sooner rather than later.</p>
<p>ActionScript developers may cringe at that news, but I don&#8217;t think they should. I <strong>strongly</strong> believe that AS3.0 developers are better positioned than the rest of us to be leaders in front-end stack development. Problems that most JavaScript developers are learning how to think about &#8212; reading and manipulating bitmap data, doing object hit testing, making cross-domain requests, &#8212; ActionScript developers have been doing <em>for years</em>. </p>
<p>Of course, this is all provided ActionScript developers are willing to make the switch. </p>
<p>To that end, I&#8217;m starting an ongoing (but occasional &#8230; perhaps <em>very</em> occasional) series of blog posts detailing some of the commonalities and differences between ActionScript 3.0 and the HTML5 Stack. I am calling it <q>HTML5 for ActionScript 3.0 Devs,</q> even though it isn&#8217;t <em>just</em> about HTML5.</p>
<p>Sometimes they&#8217;ll be deep dives. Other times they&#8217;ll be shallow ones. It is quite possible that I will misunderstand aspects of both (that&#8217;s what comments are for). My goal here is less to be comprehensive than it is to encourage developers to learn more about these topics.</p>
<p class="footnote" id="n20111003">*Of course, I am using &#8220;HTML5&#8221; as a short hand for HTML5, CSS3, JavaScript, the Document Object Model, Scalable Vector Graphics, and several other web technologies and specifications.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/10/03/introducing-html5-for-as3-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Class manipulation with classList</title>
		<link>http://tiffanybbrown.com/2011/08/15/class-manipulation-with-classlist/</link>
		<comments>http://tiffanybbrown.com/2011/08/15/class-manipulation-with-classlist/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 13:00:47 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[classlist]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6157</guid>
		<description><![CDATA[Many features of JavaScript/DOM frameworks are being incorporated into the browser natively. In my last post, I talked about the Selectors API. In this one, we&#8217;ll look at classList. classList makes it much easier to work with elements and class names. With it, you can: Add, remove, and toggle classes; Retrieve the class name at [...]]]></description>
			<content:encoded><![CDATA[<p>Many features of JavaScript/<abbr title="Document Object Model">DOM</abbr> frameworks are being incorporated into the browser natively. In my last post, I talked about <a href="http://tiffanybbrown.com/2011/08/12/meet-the-selectors-api/">the Selectors <abbr title="Application Programming Interface">API</abbr></a>. In this one, we&#8217;ll look at <code>classList</code>.</p>
<p><code>classList</code> makes it much easier to work with elements and class names. With it, you can:</p>
<ul>
<li>Add, remove, and toggle classes; </li>
<li>Retrieve the class name at a specified index; or </li>
<li>Check whether an element contains a particular class.</li>
</ul>
<p><code>classList</code> returns a <a href="https://developer.mozilla.org/en/DOM/DOMTokenList">DOMTokenList</a> &#8212; a space-separated list of tokens &#8212; containing the class names currently applied to the element.</p>
<p>Its syntax is simple: <code>elementNode.classList.methodname(arg)</code> where <code>methodname</code> is either <span style="white-space:nowrap;text-wrap:none;"><code>add()</code>,</span> <code style="white-space:nowrap;text-wrap:none;">remove()</code>, <code style="white-space:nowrap;text-wrap:none;">toggle()</code>, <code style="white-space:nowrap;text-wrap:none;">contains()</code>, or <code style="white-space:nowrap;text-wrap:none;">item()</code> and <code>arg</code> is either a numeric index (in the case of <code style="white-space:nowrap;text-wrap:none;">item()</code> ), or a class name. <code>classList</code> also has a <code>length</code> property, which tells you how many class names have been applied to the element.</p>
<p>Let&#8217;s look at some examples.</p>
<h2>LetsPretendWeAreBuildingANewsSite.net</h2>
<p>Pretend we&#8217;re building the home page of a news web site. This means we have lots of lists of stories, each styled slightly differently based on their section and prominence. We&#8217;re also going to allow users to hide some lists of headlines. Which ones can be hidden is determined by a class name.</p>
<p>One of our home page lists, then, has three class names: <code>hardnews</code> (as opposed to say, celebrity gossip), <code>business</code>, and <code>removable</code>. The markup looks like this:</p>
<pre>&lt;ul id="bizheadlines" class="hardnews business removable"&gt;
	&lt;li&gt;Coca-Cola posts a Q3 profit&lt;/li&gt;
	&lt;li&gt;Justin Timberlake invests in MySpace&lt;/li&gt;
	&lt;li&gt;Google tries to get social (again) with Google+&lt;/li&gt;
	&lt;li&gt;Southwest and AirTran airlines to merge&lt;/li&gt;
	&lt;li&gt;Stocks can't decide whether they're up or down&lt;/li&gt;
&lt;/ul&gt;</pre>
<h3>Retrieving all classes on an element</h3>
<p>If we wanted to retrieve all class names on our list, that&#8217;s an easy enough task:</p>
<pre>var biz = document.getElementById('bizheadlines'); // could also use document.querySelector('#bizheadlines');
var bizclasses = biz.classList;
console.log(bizclasses)</pre>
<p>The code above would write <code>hardnews business removable</code> to the JavaScript console.</p>
<p>Retrieving all class names on an element is only somewhat useful. You would typically use this to test whether the element has a class at all, or whether <code>classList</code> is supported by the browser. If <code>document.body.classList == undefined</code>, for example, you know that it is unsupported in that browser.</p>
<h3>Retrieving a class name by index</h3>
<p>Instead, let&#8217;s try retrieving the third class name in the list. Here we&#8217;d use <code>item(n)</code>, where <em>n</em> is an integer between 0 and the number of classes minus 1 (<code>element.classList.length - 1</code>).</p>
<pre>var biz = document.getElementById('bizheadlines');
var bizclasses = biz.classList;
console.log( bizclasses.item(2) )</pre>
<p>Executing the above writes <code>removable</code> to the console. If a class name does not exist at that index, the value of <code>bizclasses.item(2)</code> would be <code>null</code> instead.</p>
<h3>Adding a class name</h3>
<p>Now, the real fun of <code>classList</code> is the ability to add, remove and toggle the class names of an element. So let&#8217;s say one of our users wants to hide our list. They can do that because we&#8217;ve specified that it is removable with the <code>removable</code> class. But removable only says that it <em>can</em> be removed. We need to add another class (hide) in order to remove the list from view. Meet the <code>add()</code> method.</p>
<pre>var biz = document.getElementById('bizheadlines');
biz.classList.add('hide');</pre>
<p>In order for this to work, of course, <code>.hide</code> must be defined in our CSS: <code>.hide{display:none;}</code>.</p>
<p>Note that <b>you can&#8217;t add a list of space-separated values to <code>classList</code></b>. For example, <code>document.body.classList.add('sports sectionfront')</code> won&#8217;t work. You must instead add them one at a time, or use <code>className</code>.</p>
<h3>Removing a class name</h3>
<p>To remove a class name (maybe our user wants to restore that list of headlines) use the <code>remove()</code> method. It, like <code>add()</code>, accepts a class name as a parameter.</p>
<pre>var biz = document.getElementById('bizheadlines');
biz.classList.remove('hide');</pre>
<p>Here too, you need to remove classes one by one, or use <code>className</code>.</p>
<h3>Toggling classes</h3>
<p>Of course, since we&#8217;re just adding and removing a class name, we could just toggle it. As you&#8217;d expect, this is where we&#8217;d use the <code>toggle()</code> method.</p>
<pre>var biz = document.getElementById('bizheadlines');
biz.classList.toggle('hide');</pre>
<p>If the element does not contain the <code>hide</code> class, <code>toggle()</code> will add it. If it does, invoking <code>toggle()</code> will remove it.</p>
<h3>Checking whether a particular class exists</h3>
<p>What if you wanted to show a message only when the user tries to close a hard news headline list? Then you would want to check whether the element in question has a <code>hardnews</code> class. This is where the <code>contains()</code> method comes in handy.</p>
<pre>// Get all removable lists of headlines
var removable = document.querySelectorAll('.removable');

var clickhandler = function(e){
	// if the current target has a 'hardnews' class
	if( e.target.classList.contains('hardnews') ){
		var cont = confirm("Hiding this will make you a less informed citizen. Are you sure?");

		if(cont){
			e.target.classList.add('hide');
		} else{}
	}
}

// apply the click handler
for( var i=0; i < removable.length; i++){
	removable[i].onclick = clickhandler;
}</pre>
<p>In the above example, we have applied a click handler to all removable lists. If a user tries to remove a hard news section, we ask for confirmation. If they confirm, we will hide it. Otherwise, we won't.</p>
<h3>See <code style="text-transform:none;">classList</code> in action</h3>
<p>Though decidedly not a news web site home page, you can get a sense of how these methods can be used together in this <a href="http://tiffanybbrown.com/code/2011/classlist/">classList demo</a>.</p>
<h3>Browser support</h3>
<p>Here's the caveat: <code>classList</code> is <a href="http://caniuse.com/classlist">not yet supported</a> in iOS Safari, or Internet Explorer 9 (it's unclear whether support will be available in IE10). In those cases, you will still need to use <code style="white-space:nowrap;text-wrap:none;">className</code> or <code style="white-space:nowrap;text-wrap:none;">getAttribute('class')</code> and manipulate it using JavaScript string methods and regular expressions.</pre>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/08/15/class-manipulation-with-classlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meet the Selectors API</title>
		<link>http://tiffanybbrown.com/2011/08/12/meet-the-selectors-api/</link>
		<comments>http://tiffanybbrown.com/2011/08/12/meet-the-selectors-api/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 12:00:44 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[selectors API]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6125</guid>
		<description><![CDATA[DOM Scripting is sometimes clunky. Consider the retrieval of elements with a particular class name. The code might look like this: var p = document.getElementsByTagName('p'); var newsitems = []; var i; for(i = 0; i < p.length; i++){ if( p[i].className == 'newsitem' ){ newsitems.push( p[i] ); } } In the example above, we&#8217;ve retrieved all [...]]]></description>
			<content:encoded><![CDATA[<p>DOM Scripting is sometimes clunky. Consider the retrieval of elements with a particular class name. The code might look like this:</p>
<pre>var p = document.getElementsByTagName('p');
var newsitems = [];
var i;
for(i = 0; i < p.length; i++){
  if( p[i].className == 'newsitem' ){
     newsitems.push( p[i] );
  }
}</pre>
<p>In the example above, we&#8217;ve retrieved all elements in the document using <code>document.getElementsByTagName()</code>. Then we&#8217;ve iterated over them, checking for the presence of the desired class name.  </p>
<p>It&#8217;s ugly, right? That&#8127;s even more true when you look at the elegant, CSS-style selectors of libraries like <a href="http://jquery.com/">jQuery</a> and <a href="http://mootools.net/">MooTools</a>.</p>
<p>Code like that above is why the W3C developed a <a href="http://www.w3.org/TR/selectors-api/">Selectors API</a>. It consists of two methods on the document object: <code>querySelector()</code> and <code>querySelectorAll()</code>.</p>
<p><code>querySelector()</code> and <code>querySelectorAll()</code> both accept any CSS selector that the browser supports. All <a href="http://caniuse.com/#search=queryselectorall">recent browser releases</a> support both methods, though Internet Explorer 8 is limited to CSS2 selectors.</p>
<p><code>querySelectorAll()</code>, as its name suggests, returns a node list of elements matching the given selector. <code>querySelector()</code> only returns the <em>first</em> matching element. You can pass any CSS selector as an argument, including ones like the adjacent sibling combinator and <code>nth-child()</code> if the browser supports it.</p>
<p>Let's re-write the above code using <code>querySelectorAll()</code>. </p>
</pre>
<pre>
var newsitems = document.querySelectorAll('.newsitem');
</pre>
<p>That&#8217;s <em>much</em> more concise. The <code>newsitems</code> variable contains only those elements with the <code>newsitem</code> class. Using the Selectors API greatly simplifies the code we need to use when interacting with the DOM.</p>
<h3>Learn more</h3>
<ul>
<li><a href="http://www.w3.org/TR/selectors-api/">Selectors API Level 1 Specification</a></li>
<li><a href="http://www.w3.org/TR/selectors-api2/">Selectors API Level 2 Specification</a></li>
<li><a href="http://www.w3.org/TR/css3-selectors/">CSS Selectors Level 3 Specification</a></li>
<li><a href="http://www.w3.org/TR/CSS2/">CSS Cascading Style Sheets Level 2 Revision 1 Specification</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/08/12/meet-the-selectors-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning JavaScript</title>
		<link>http://tiffanybbrown.com/2011/04/07/learning-javascript/</link>
		<comments>http://tiffanybbrown.com/2011/04/07/learning-javascript/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 09:00:39 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[JavaScript/ECMAScript]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=5657</guid>
		<description><![CDATA[Posted for posterity (or at least until these links rot), a list of links and books to get you started. This list isn&#8217;t exhaustive by any stretch. Have any other resources to share? Post in the comments. Eloquent JavaScript JavaScript from the Mozilla Developer Center Microsoft&#8217;s Scripting Guide for Internet Explorer WebKit DOM Reference Opera [...]]]></description>
			<content:encoded><![CDATA[<p>Posted for posterity (or at least until these links rot), a list of links and books to get you started. This list isn&#8217;t exhaustive by any stretch. Have any other resources to share? Post in the comments.</p>
<ul>
<li><a href="http://eloquentjavascript.net/">Eloquent JavaScript</a></li>
<li><a href="https://developer.mozilla.org/en/JavaScript">JavaScript from the Mozilla Developer Center</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ff729665%28v=VS.94%29.aspx">Microsoft&#8217;s Scripting Guide</a> for Internet Explorer</li>
<li><a href="http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/WebKitDOMRef/index.html">WebKit DOM Reference</a></li>
<li><a href="http://www.opera.com/docs/">Opera Documentation</a> (Look under Documentation &rarr; Web Specifications Support then choose the top-most Presto engine listed, currently 2.8)</li>
<li><i class="title">High Performance JavaScript</i> by Nicholas C. Zakas et al. <a href="http://www.amazon.com/Performance-JavaScript-Faster-Application-Interfaces/dp/059680279X/webinista-20/">Buy from Amazon.com</a></li>
<li><i class="title">Pro JavaScript Techniques</i> by John Resig <a href="http://www.amazon.com/Pro-JavaScript-Techniques-John-Resig/dp/1590597273/webinista-20/">Buy from Amazon.com</a></li>
<li><a href="http://es5.github.com/">Annotated ECMAScript 5.1 Specification</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/04/07/learning-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The HTML5 video progress event</title>
		<link>http://tiffanybbrown.com/2010/07/05/the-html5-video-progress-event/</link>
		<comments>http://tiffanybbrown.com/2010/07/05/the-html5-video-progress-event/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 17:53:15 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[DOM]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[event handling]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[html5 video]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[multimedia]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=4183</guid>
		<description><![CDATA[UPDATE: Thanks to zcorpan&#8217;s comments, I have posted a follow-up entry that should clarify the current status of the video element and its properties. I have been playing around with the HTML5 video interface lately, trying to understand what can be done with it, and how each browser supports its features as set forth in [...]]]></description>
			<content:encoded><![CDATA[<div class="editors-note"><b>UPDATE:</b> Thanks to zcorpan&#8217;s comments, I have posted a <a href="http://tiffanybbrown.com/2010/07/06/the-html5-video-progress-event-redux/">follow-up entry</a> that should clarify the current status of the video element and its properties.</div>
<div class="editors-note">I have been playing around with the HTML5 video interface lately, trying to understand what can be done with it, and how each browser supports its features as set forth in the <a href="http://www.w3.org/TR/html5/video.html">specification</a> (which is a working draft, and far from a final version).</p>
<p>Consider this in the first in a series of note-style posts that I will write (or perhaps not) about the HTML5 video interface as I develop an HTML5 video player interface.
</p></div>
<p>The <code>progress</code> event is fired as the browser loads more of the media file. It may not be fired reliably, however. Chrome, for example, will not fire the progress event if it has cached the video file. </p>
<p>Only Firefox provides a means to calculate the amount of the video that has been loaded. The progress event object includes <code>total</code> and <code>loaded</code> properties that reflect the total size of the video file, and the amount the browser has retrieved from the server. This is also a reflection of how each browser handles video downloads.</p>
<p>Firefox requests partial content on the initial page load, then pauses downloading until the play event is fired. After the play event is fired &#8212; whether when the user clicks the &#8216;play&#8217; button or the video tag has the <code>autoplay</code> attribute &#8212; Firefox resumes downloading the video file. </p>
<p>Safari, Chrome, and Opera conversely, download the entire video on page load &#8212; they automatically buffer by default. Opera and Chrome, however, will make the video available for play almost immediately, while Safari takes several seconds to download a larger portion of the file. Firefox will behave similarly if when the <a href="http://hacks.mozilla.org/2009/12/autobuffering-video-in-firefox/" title="autobuffering video in Firefox"><code>autobuffer</code> attribute</a> is present. </p>
<p>Presumably because they auto-buffer video, neither Safari, Chrome, nor Opera offer a means by which to detect either the video&#8217;s size, nor how much of the video has loaded.</p>
<p>Some example code for handling the progress event (assuming we&#8217;re wrapping this video element in a <code>&lt;div&gt;</code> tag with an id of &#8216;container&#8217;). This will return the percentage of the video loaded in Firefox (and other browsers that don&#8217;t auto-buffer), and fail silently in other browsers.</p>
<pre>
var container = document.getElementById('container');
var video = document.createElement(video);
// only Firefox and Opera support Ogg <ins datetime="2010-07-06T13:09:11+00:00">... oh yeah Chrome does too.</ins>
video.setAttribute('src','movie.ogv');
function progressHandler(e){
      if(e.total &#038;&#038; e.loaded){
           // percentage of video loaded
          var proportion = Math.round( e.loaded / e.total );
          return proportion * 100;
      } else {
           // do nothing because we're autobuffering.
      }
}
video.addEventListener('progress',progressHandler,false);
container.appendChild(video);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2010/07/05/the-html5-video-progress-event/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>JavaScript tip: Use a for-loop to reveal properties and methods</title>
		<link>http://tiffanybbrown.com/2010/06/29/javascript-tip-use-a-for-loop-to-reveal-properties-and-methods/</link>
		<comments>http://tiffanybbrown.com/2010/06/29/javascript-tip-use-a-for-loop-to-reveal-properties-and-methods/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 22:27:34 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[Web Development & Programming]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=4138</guid>
		<description><![CDATA[I&#8217;ve been tinkering with the HTML5 video element quite a bit lately. However, it&#8217;s not the best-documented thing in the world. There are very useful properties in the video element&#8217;s events that aren&#8217;t so clearly explained in the spec. Developing a media player means you have to uncover these properties using a little bit of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been tinkering with the <a href="http://www.w3.org/TR/html5/video.html">HTML5 video</a> element quite a bit lately. However, it&#8217;s not the best-documented thing in the world. There are very useful properties in the video element&#8217;s events that aren&#8217;t so clearly explained in the spec. Developing a media player means you have to uncover these properties using a little bit of scripting know-how.</p>
<p>Luckily for us, there is a <em>very easy way</em> to reveal the methods and properties of just about any element in the DOM. Experienced JavaScript developers probably know this. It&#8217;s possibly one of the most useful things you can know about using JavaScript: <strong>use a <code>for</code>-loop to reveal an object&#8217;s unknown properties and methods</strong>.</p>
<p>Let&#8217;s assume you have a div with an <code>id</code> value of &#8220;test.&#8221; Let&#8217;s also assume that you have <a href="http://getfirebug.com/">Firebug,</a> for Firefox installed (and enabled), or that you have <a href="http://developer.apple.com/safari/library/documentation/appleapplications/conceptual/safari_developer_guide/2safaridevelopertools/safaridevelopertools.html">enabled developer tools</a> in Safari (this may work with <a href="http://www.opera.com/dragonfly/">Opera</a>&#8216;s Dragonfly as well).</p>
<p>To find out the properties and methods, for &#8220;test,&#8221; you would use the following code:</p>
<pre>
var p; // initialize this variable.

var testElement = document.getElementById('test');

for(p in testElement){
     console.log( p +': '+testElement[p] ); // using array notation for objects, which works just fine.
}
</pre>
<p>In Firebug, the output will look a bit like this:</p>
<div class="img500">
<a href="http://webinista.s3.amazonaws.com/images/uploads/2010/06/firebugoutput.png"><img src="http://webinista.s3.amazonaws.com/images/uploads/2010/06/firebugoutput-500x313.png" alt="" title="Firebug Output" width="500" height="313" class="alignnone size-medium wp-image-4139" /></a>
</div>
<p>That&#8217;s a list of every property and every method &#8212; and whether or not it&#8217;s a native part of the DOM (as supported by the browser) &#8212; available for this object.</p>
<p>Similarly, you can do the same thing with an event. Consider:</p>
<pre>

function clickHandler(evt){
      var p;
      for(p in evt){
            console.log( p+': '+evt[p] );
      }
}
testElement.addEventListener('click',clickHandler,false);
</pre>
<p>The code above would reveal all of the properties of the event listener (note that in Internet Explorer, you would use the <a href="http://msdn.microsoft.com/en-us/library/ms536343%28VS.85%29.aspx"><code>attachEvent()</code></a> method). This is how I learned that in Firefox, the progress event of the video element contains both &#8220;total&#8221; and &#8220;loaded&#8221; properties &#8212; which will come in handy for creating a loading progress display.</p>
<p class="footnote">Now if you don&#8217;t use Firefox with Firebug, Safari (or Opera), you can also output the data to a <code>&lt;div&gt;</code> in your HTML page.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2010/06/29/javascript-tip-use-a-for-loop-to-reveal-properties-and-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proposed File API specification</title>
		<link>http://tiffanybbrown.com/2009/12/10/proposed-file-api-specification/</link>
		<comments>http://tiffanybbrown.com/2009/12/10/proposed-file-api-specification/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 15:15:35 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[Web Development & Programming]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=3017</guid>
		<description><![CDATA[Web applications should have the ability to manipulate as wide as possible a range of user input, including files that a user may wish to upload to a remote server or manipulate inside a rich web application. This specification defines the basic representations for files, lists of files, errors raised by access to files, and [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Web applications should have the ability to manipulate as wide as possible a range of user input, including files that a user may wish to upload to a remote server or manipulate inside a rich web application. This specification defines the basic representations for files, lists of files, errors raised by access to files, and programmatic ways to read files. The interfaces and API defined in this specification can be used with other interfaces and APIs exposed to the web platform.</p></blockquote>
<p>From <a href="http://www.w3.org/TR/FileAPI/" class="ext">File API</a> working draft by Arun Ranganathan of Mozilla Corporation.</p>
<p>This API, if adopted by major browser vendors will allow client-side file manipulation and asynchronous uploads. </p>
<p>As far as I know, asynchronous uploads are only possible now using a combination of Flash and JavaScript such as <a href="http://swfupload.org/">SWFUpload</a>. Flickr&#8217;s uploader uses a <a href="http://ajaxian.com/archives/flickrs-new-file-uploader">similar technique</a>. Client-side file processing is impossible without a plug-in.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2009/12/10/proposed-file-api-specification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A really loose regex for matching URLs</title>
		<link>http://tiffanybbrown.com/2009/11/25/a-really-loose-regex-for-matching-urls/</link>
		<comments>http://tiffanybbrown.com/2009/11/25/a-really-loose-regex-for-matching-urls/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 17:42:30 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=2726</guid>
		<description><![CDATA[Not recommended for validating URLs, but it will find them. The g flag is JavaScript specific and indicates that the matching should be global. /http:\/\/[\-\.\/\w]{1,256}(&#124;\/)/gi]]></description>
			<content:encoded><![CDATA[<p>Not recommended for validating URLs, but it will find them. The <code>g</code> flag is JavaScript specific and indicates that the matching should be global.</p>
<p><code>/http:\/\/[\-\.\/\w]{1,256}(|\/)/gi</code></p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2009/11/25/a-really-loose-regex-for-matching-urls/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Recommended: &#8220;Google Closure: How not to write JavaScript&#8221;</title>
		<link>http://tiffanybbrown.com/2009/11/12/recommended-google-closure-how-not-to-write-javascript/</link>
		<comments>http://tiffanybbrown.com/2009/11/12/recommended-google-closure-how-not-to-write-javascript/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 15:35:22 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[JavaScript/ECMAScript]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=2443</guid>
		<description><![CDATA[SitePoint&#8217;s Kevin Yank brings us some serious criticism of Google Closure from Dmitry Baranovskiy, creator of the Rapha&#235;l and gRapha&#235;l JavaScript libraries. From the post: Having delivered a talk on how to write your own JavaScript library (detailed notes) at the conference, Dmitry shared his thoughts on the new library over breakfast the next morning. [...]]]></description>
			<content:encoded><![CDATA[<p>SitePoint&#8217;s Kevin Yank brings us some serious criticism of <a href="http://tiffanybbrown.com/2009/11/06/google-releases-closure-tools-library-and-compiler-for-javascript/">Google Closure</a> from <a href="http://dmitry.baranovskiy.com/" class="ext">Dmitry Baranovskiy</a>, creator of the <a href="http://raphaeljs.com/" class="ext">Rapha&euml;l</a> and <a href="http://g.raphaeljs.com/" class="ext">gRapha&euml;l</a> JavaScript libraries. From the post:</p>
<blockquote><p>Having delivered a talk on <a href="http://www.slideshare.net/Dmitry.Baranovskiy/your-javascript-library" class="ext">how to write your own JavaScript library</a> (<a href="http://passingcuriosity.com/2009/notes-on-dmitry-baranovskiys-talk-on-your-javascript-library/" class="ext">detailed notes</a>) at the conference, Dmitry shared his thoughts on the new library over breakfast the next morning. “Just what the world needs&#8212;another sucky JavaScript library,” he said. When I asked him what made it ‘sucky’, he elaborated. “It’s a JavaScript library written by Java developers who clearly don’t <em>get</em> JavaScript.”</p>
<p>For the rest of the day, to anyone who would listen, Dmitry cited example after example of the terrible code he had found when he went digging through Closure. His biggest fear, he told me, was that people would switch from truly excellent JavaScript libraries like <a href="http://jquery.com/" class="ext">jQuery</a> to Closure on the strength of the Google name.</p>
</blockquote>
<p>The post continues with examples of how Google gets it wrong with Closure. But as importantly, they&#8217;re excellent tips and tricks that every web developer can use to produce faster, better JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2009/11/12/recommended-google-closure-how-not-to-write-javascript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google releases Closure Tools, library and compiler for JavaScript</title>
		<link>http://tiffanybbrown.com/2009/11/06/google-releases-closure-tools-library-and-compiler-for-javascript/</link>
		<comments>http://tiffanybbrown.com/2009/11/06/google-releases-closure-tools-library-and-compiler-for-javascript/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:00:35 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[Web Development & Programming]]></category>
		<category><![CDATA[closure tools]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=2396</guid>
		<description><![CDATA[From the Google Code Blog: Closure Compiler, Closure Library, Closure Templates, and Closure Inspector all started as 20% projects and hundreds of Googlers have contributed thousands of patches. Today, each Closure Tool has grown to be a key part of the JavaScript infrastructure behind web apps at Google. That&#8217;s why we&#8217;re particularly excited (and humbled) [...]]]></description>
			<content:encoded><![CDATA[<p>From the <a href="http://googlecode.blogspot.com/2009/11/introducing-closure-tools.html">Google Code Blog</a>:</p>
<blockquote><p>Closure Compiler, Closure Library, Closure Templates, and Closure Inspector all started as 20% projects and hundreds of Googlers have contributed thousands of patches. Today, each Closure Tool has grown to be a key part of the JavaScript infrastructure behind web apps at Google.  That&#8217;s why we&#8217;re particularly excited (and humbled) to open source them to encourage and support web development outside Google. We want to hear what you think, but more importantly, we want to see what you make. So have at it and have fun!</p></blockquote>
<ul>
<li><a href="http://closure-library.googlecode.com/svn/trunk/closure/goog/docs/index.html">Closure Library API Documentation</a></li>
<li><a href="http://code.google.com/closure/compiler/">Closure Compiler</a></li>
<li><a href="http://code.google.com/closure/templates/">Closure Templates</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2009/11/06/google-releases-closure-tools-library-and-compiler-for-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recommended viewing: Brendan Eich&#8217;s &#8220;ECMA Harmony and the Future of JavaScript&#8221;</title>
		<link>http://tiffanybbrown.com/2009/11/05/recommended-viewing-brendan-eichs-ecma-harmony-and-the-future-of-javascript/</link>
		<comments>http://tiffanybbrown.com/2009/11/05/recommended-viewing-brendan-eichs-ecma-harmony-and-the-future-of-javascript/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 07:00:11 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[brendan eich]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[yuiconf2009]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=2342</guid>
		<description><![CDATA[A transcript isn&#8217;t available yet.]]></description>
			<content:encoded><![CDATA[<div class="video"><object width="576" height="324"><param name="movie" value="http://d.yimg.com/m/up/ypp/default/player.swf"></param><param name="flashVars" value="vid=16429147&#038;"></param><param name="allowfullscreen" value="true"></param><param name="wmode" value="transparent"></param><embed width="576" height="324" allowFullScreen="true" src="http://d.yimg.com/m/up/ypp/default/player.swf" type="application/x-shockwave-flash" flashvars="vid=16429147&#038;"></embed></object></div>
<p>A <a href="http://developer.yahoo.com/yui/theater/video.php?v=eich-yuiconf2009-harmony" class="ext" rel="transcript">transcript</a> isn&#8217;t available yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2009/11/05/recommended-viewing-brendan-eichs-ecma-harmony-and-the-future-of-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

