<?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>Ajaxian &#187; Chrome</title>
	<atom:link href="http://ajaxian.com/by/topic/chrome-topic/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 02 Feb 2012 22:23:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
    	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Code injection, error throwing</title>
		<link>http://ajaxian.com/archives/code-injection-error-throwing</link>
		<comments>http://ajaxian.com/archives/code-injection-error-throwing#comments</comments>
		<pubDate>Sat, 11 Jun 2011 03:01:12 +0000</pubDate>
		<dc:creator>jvaughan</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=10673</guid>
		<description><![CDATA[In a blog, Opera Software Developer Relations team member Tiffany B. Brown looks at code injection, error throwing and handling and mobile debugging. She notes Opera Dragonfly and its remote debug features provide a way to debug mobile sites from their desktop. Brown mentions WebKit&#8217;s recently added remote debugging capabilities, folded into Google Chrome developer <a href="http://ajaxian.com/archives/code-injection-error-throwing">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>In a blog, Opera Software Developer Relations team member Tiffany B. Brown looks at <a href="http://www.alistapart.com/articles/modern-debugging-tips-and-tricks/">code injection, error throwing and handling and mobile debugging.</a> She notes Opera Dragonfly and its remote debug features provide a way to debug mobile sites from their desktop. Brown mentions WebKit&#8217;s recently added remote debugging capabilities, folded into Google Chrome developer tools. Pointed to as well are Bugaboo, an iOS app for Safari-based debugging; JS Console which is available on the Web or as an iOS app; and Weinre for WebKit-based browsers. In this entry, Brown looks more closely at Dragonfly remote debug and JSConsole.</p>
<p> </p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/code-injection-error-throwing/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Chrome Frame is out of Beta!</title>
		<link>http://ajaxian.com/archives/chrome-frame-is-out-of-beta</link>
		<comments>http://ajaxian.com/archives/chrome-frame-is-out-of-beta#comments</comments>
		<pubDate>Wed, 22 Sep 2010 19:47:32 +0000</pubDate>
		<dc:creator>Brad Neuberg</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Chrome Frame]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=10361</guid>
		<description><![CDATA[Big news: Chrome Frame is now stable and out of beta! Today, we’re very happy to take the Beta tag off of Google Chrome Frame and promote it to the Stable channel. This stable channel release provides our most polished version of Google Chrome Frame to date, allowing users to access modern web technologies like <a href="http://ajaxian.com/archives/chrome-frame-is-out-of-beta">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/WP3N1bgjiek?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/WP3N1bgjiek?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>Big news: <a href="http://blog.chromium.org/2010/09/google-chrome-frame-stable-and-speedy.html">Chrome Frame is now stable and out of beta</a>!</p>
<blockquote><p>Today, we’re very happy to take the Beta tag off of Google Chrome Frame and promote it to the Stable channel. This stable channel release provides our most polished version of Google Chrome Frame to date, allowing users to access modern web technologies like HTML5 on legacy browsers. You now can <a href="http://www.google.com/chromeframe/">download the stable version of Google Chrome Frame</a> and users of the Beta will be automatically updated to it in the days ahead. If you’re an IT administrator, we’ve also posted an <a href="http://www.google.com/chromeframe/eula.html?msi=true">MSI installer</a> for deploying Google Chrome Frame in your network.</p></blockquote>
<p>Chrome Frame is now much faster and stable. It's <a href="http://www.chromium.org/developers/how-tos/chrome-frame-getting-started">extremely simple</a> to have a site use Chrome Frame:</p>
<div class="igBar"><a href="javascript:showCodeTxt('html-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">HTML:</span>
<div id="html-2">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">&lt;meta</span></a> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">"X-UA-Compatible"</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">"chrome=1"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>For the next step the Chrome Frame team is focusing on making start-up speed even faster and removing the need for administrator rights when installing the plug-in.</p>
<p>Congrats to the Chrome Frame team!</p>
<p>[<em>Disclosure: Alex Russell, the chipper-looking fellow in the video, and I have worked together at Google and on Dojo before.</em>]</meta></p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/chrome-frame-is-out-of-beta/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Chrome supporting EventSource for server push, and richer Worker API</title>
		<link>http://ajaxian.com/archives/chrome-supporting-eventsource-for-server-push-and-richer-worker-api</link>
		<comments>http://ajaxian.com/archives/chrome-supporting-eventsource-for-server-push-and-richer-worker-api#comments</comments>
		<pubDate>Thu, 27 May 2010 11:19:49 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=9410</guid>
		<description><![CDATA[Rick Waldron has been delving into Chrome and Chromium to find some nice updates. First, he uncovers new support for the EventSource API that allows for simple server push of DOM events as shown in this simple client and server pairing: PLAIN TEXT JAVASCRIPT: &#160; document.addEventListener&#40;'DOMContentLoaded', function &#40;&#41; &#123; &#160; &#160; var eventSrc&#160; = new <a href="http://ajaxian.com/archives/chrome-supporting-eventsource-for-server-push-and-richer-worker-api">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Rick Waldron has been delving into Chrome and Chromium to find some nice updates.</p>
<p>First, he <a href="http://weblog.bocoup.com/chrome-6-server-sent-events-with-new-eventsource">uncovers new support</a> for the <a href="http://dev.w3.org/html5/eventsource/">EventSource</a> API that allows for simple server push of DOM events as shown in this simple client and server pairing:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-6');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-6">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">document.<span style="color: #006600;">addEventListener</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'DOMContentLoaded'</span>, <span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> eventSrc&nbsp; = <span style="color: #003366; font-weight: bold;">new</span> EventSource<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'events.php'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; eventSrc.<span style="color: #006600;">addEventListener</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'open'</span>, <span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span>event<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; console.<span style="color: #006600;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>event.<span style="color: #006600;">type</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; eventSrc.<span style="color: #006600;">addEventListener</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'message'</span>, <span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span>event<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; console.<span style="color: #006600;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>event.<span style="color: #006600;">type</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; console.<span style="color: #006600;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>event.<span style="color: #006600;">data</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span>, <span style="color: #003366; font-weight: bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<div class="igBar"><a href="javascript:showCodeTxt('php-7');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">PHP:</span>
<div id="php-7">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Content-Type: text/event-stream<span style="color:#000099; font-weight:bold;">\n</span><span style="color:#000099; font-weight:bold;">\n</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// despite not having the while(true){}</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// this seems to repeat pushing messages to the client</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'data: '</span> . <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">"<span style="color:#000099; font-weight:bold;">\n</span>"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Then, he finds out that the <a href="http://weblog.bocoup.com/javascript-web-workers-chrome-5-now-supports-complex-messages">Web Worker API now supports complex messages, so you can <code>postMessage</code> more than Strings. Send over objects and Arrays with ease:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-8');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">//&nbsp; TEST ANOTHER THREAD SAFE OBJECT ARG</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> obj = <span style="color: #003366; font-weight: bold;">new</span> Object<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">obj.<span style="color: #006600;">isArray</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color:#006600; font-weight:bold;">&#91;</span> <span style="color:#800000;">1</span>,<span style="color:#800000;">2</span>,<span style="color:#800000;">3</span>,<span style="color:#800000;">4</span>,<span style="color:#800000;">5</span> <span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">obj.<span style="color: #006600;">isString</span>&nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #3366CC;">'Foo bar baz'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">obj.<span style="color: #006600;">resultOf</span>&nbsp; &nbsp; &nbsp; &nbsp; = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'returned from self executing function'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">worker.<span style="color: #006600;">postMessage</span><span style="color:#006600; font-weight:bold;">&#40;</span>obj<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">//&nbsp; TEST STRING ARG</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">worker.<span style="color: #006600;">postMessage</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">'Hello Worker Process'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">//&nbsp; TEST ARRAY ARG</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">worker.<span style="color: #006600;">postMessage</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span> <span style="color:#800000;">1</span>, <span style="color:#800000;">2</span>, <span style="color:#800000;">3</span>, <span style="color:#800000;">4</span> <span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">//&nbsp; TEST BOOLEAN ARG</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">worker.<span style="color: #006600;">postMessage</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #003366; font-weight: bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/chrome-supporting-eventsource-for-server-push-and-richer-worker-api/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Chrome Web Store? I want an Open Web Store</title>
		<link>http://ajaxian.com/archives/chrome-web-store-i-want-an-open-web-store</link>
		<comments>http://ajaxian.com/archives/chrome-web-store-i-want-an-open-web-store#comments</comments>
		<pubDate>Wed, 19 May 2010 17:04:02 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=9334</guid>
		<description><![CDATA[The Chrome Web Store was shown off at the Google I/O keynote (streaming live) today along with the other great news of open codecs, great new tools, and more. I found myself torn about this one. For one, it seems tied into Chrome itself. The problem that Sundar stated (developers needing a good channel; users <a href="http://ajaxian.com/archives/chrome-web-store-i-want-an-open-web-store">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://code.google.com/chrome/apps/images/launcher.png" width="480"/></p>
<p>The Chrome Web Store was shown off at the <a href="http://www.youtube.com/GoogleDevelopers">Google I/O keynote (streaming live)</a> today along with the other great news of open codecs, great new tools, and more.</p>
<p>I found myself torn about this one. For one, it seems tied into Chrome itself. The problem that Sundar stated (developers needing a good channel; users having a hard time finding things) is valid for the entire Web. We don't need a Firefox Web Store, IE Web Store, etc etc etc. We have an opportunity to do better here.</p>
<p>That being said, it was great to see the early stages here and how they give developers the ability to place your Web application in to an experience where you can put a price tag on top.</p>
<p>I would love to get details here. How do you package the application? Do you have to upload the package to the store?</p>
<p>I wonder if there is room for a distributed system that allows me to put a price tag on my web application, but keep it at my URL.</p>
<p>What do you think? There is a session on the store... so I look forward to the deets!</p>
<p><img src="http://ajaxian.com/wp-content/images/rodonchromewebstore.png" alt="" title="rodonchromewebstore" width="356" height="66" class="alignnone size-full wp-image-9335"/></p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/chrome-web-store-i-want-an-open-web-store/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A busy Chrome week: Extensions, Web Sockets, and more</title>
		<link>http://ajaxian.com/archives/a-busy-chrome-week-extensions-web-sockets-and-more</link>
		<comments>http://ajaxian.com/archives/a-busy-chrome-week-extensions-web-sockets-and-more#comments</comments>
		<pubDate>Thu, 10 Dec 2009 11:07:01 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8188</guid>
		<description><![CDATA[It has been a busy work for Chrome, with some interesting features hitting the various "channels". Web Sockets First up, we have Web Socket support being turned on by default on the developer channel. If you want to be a really cool JS h4x0r you should write a server app using node.js. If you want <a href="http://ajaxian.com/archives/a-busy-chrome-week-extensions-web-sockets-and-more">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>It has been a busy work for Chrome, with some interesting features hitting the various "channels".</p>
<p><a href="http://dev.w3.org/html5/websockets/">Web Sockets</a></p>
<p>First up, we have <a href="http://blog.chromium.org/2009/12/web-sockets-now-available-in-google.html">Web Socket</a> support being turned on by default on the developer channel. If you want to be a really cool JS h4x0r you should write a <a href="http://devthought.com/blog/2009/12/nodejs-and-the-websocket-protocol/">server app using node.js</a>. If you want it to work on older browsers, try out the old favourite shim tale of <a href="http://github.com/gimite/web-socket-js">use Flash to degrade</a>, and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=472529">Mozilla support should be coming soon</a> and surely IE9 will support it too ;)</p>
<p>Now you can code like this:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-10');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-10">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"WebSocket"</span> <span style="color: #000066; font-weight: bold;">in</span> window<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> ws = <span style="color: #003366; font-weight: bold;">new</span> WebSocket<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"ws://example.com/service"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; ws.<span style="color: #006600;">onopen</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Web Socket is connected. You can send data by send() method.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ws.<span style="color: #006600;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"message to send"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; ....</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; ws.<span style="color: #006600;">onmessage</span> = <span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span>evt<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color: #003366; font-weight: bold;">var</span> received_msg = evt.<span style="color: #006600;">data</span>; ... <span style="color:#006600; font-weight:bold;">&#125;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; ws.<span style="color: #006600;">onclose</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color: #009900; font-style: italic;">// websocket is closed. };</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// the browser doesn't support WebSocket.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p><a href="http://blog.chromium.org/2009/12/extensions-beta-launched-with-over-300.html">Chrome Extensions Beta</a></p>
<p>Although I curse at the weak support on Chrome Mac (coming by end of week though!), other Chromers can use the new beta extension system pioneered by the awesome Aaron Boodman and team:</p>
<blockquote><p>
Today, we're really happy to release a beta of extensions that begins to deliver on our initial vision. Extensions are as easy to create as webpages. Users can install and uninstall them quickly without restart, and extensions have a great polished look that fits in with Google Chrome's minimalist aesthetic. When developers upload an extension it is available to users immediately, with limited restrictions and manual reviews only in a few situations.</p>
<p>On the technical side, we've been able to use Google Chrome's multiprocess architecture to help keep extensions stable and safe. And Chromium's extensive performance monitoring infrastructure has helped us ensure extensions affect Google Chrome's speed as little as possible. You can learn more details about the internals of our system in the videos below.
</p></blockquote>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/rNkfs8-uRTE&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/rNkfs8-uRTE&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=en_US&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object></p>
<p>I am excited about the new extension systems of Chrome and Jetpack, and wrote up thoughts on <a href="http://almaer.com/blog/out-of-the-page-and-into-the-runtime-extensions-move-the-web-development-model-further">how we are jumping out of the page and into the runtime</a> as Web developers.</p>
<p><a href="http://blog.chromium.org/2009/12/links-that-open-in-new-processes.html">rel="noreferrer" and target="_blank"</a></p>
<p>I missed the fact that in Chrome you can opt-in to a new process from a link. This is important as every tab is NOT necessarily in its own process. People assume that is the case (a one to one mapping) but it isn't (and has interesting security implications):</p>
<blockquote><p>
In many cases, though, Google Chrome needs to keep pages from related tabs in the same process, since they may access each other's contents using JavaScript code. For example, clicking links that open in a new window will generally cause the new and old pages to share a process.</p>
<p>In practice, web developers may find situations where they would like links to other pages to open in a separate process. As one example, links from messages in your webmail client would be nice to isolate from the webmail client itself. This is easy to achieve now, thanks to <a href="http://webkit.org/blog/907/webkit-nightlies-support-html5-noreferrer-link-relation/">new support in WebKit for HTML5's "noreferrer" link relation</a>.</p>
<p>To cause a link to open in a separate process from your web page, just add rel="noreferrer" and target="_blank" as attributes to the <a> tag, and then point it at a URL on a different domain name. For example:<br />
</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/a-busy-chrome-week-extensions-web-sockets-and-more/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Detecting Chrome Frame; All of the details</title>
		<link>http://ajaxian.com/archives/detecting-chrome-frame-all-of-the-details</link>
		<comments>http://ajaxian.com/archives/detecting-chrome-frame-all-of-the-details#comments</comments>
		<pubDate>Fri, 02 Oct 2009 09:39:50 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=7508</guid>
		<description><![CDATA[Tamura Jones has published a detailed look at detecting for Chrome Frame (.xhtml huh, wow! :). He nicely aggregates a lot of the info that has been seen on Chrome Frame into one place, and his series covers: Basics of Chrome Frame: what is it? Supporting Chrome Frame: &#60;meta http-equiv="X-UA-Compatible" content="chrome=1"&#62; and the like Detecting <a href="http://ajaxian.com/archives/detecting-chrome-frame-all-of-the-details">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Tamura Jones has published <a href="http://www.tamurajones.net/DetectingChromeFrame.xhtml">a detailed look at detecting for Chrome Frame</a> (.xhtml huh, wow! :).</p>
<p>He nicely aggregates a lot of the info that has been seen on Chrome Frame into one place, and his series covers:</p>
<ul>
<li><a href="http://www.tamurajones.net/ChromeFrameBasics.xhtml">Basics of Chrome Frame</a>: what is it?</li>
<li><a href="http://www.tamurajones.net/SupportingChromeFrame.xhtml">Supporting Chrome Frame</a>: &lt;meta http-equiv="X-UA-Compatible" content="chrome=1"&gt; and the like </li>
<li><a href="http://www.tamurajones.net/DetectingChromeFrame.xhtml">Detecting Chrome Frame</a>: Using CFInstall and the like</li>
<li><a href="http://www.tamurajones.net/ForcingChromeFrame.xhtml">Forcing Chrome Frame</a>: How to hack the registry and using <code>cf:</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/detecting-chrome-frame-all-of-the-details/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A new way to do layout; CSS Scripting Layout</title>
		<link>http://ajaxian.com/archives/css-scripting-layout</link>
		<comments>http://ajaxian.com/archives/css-scripting-layout#comments</comments>
		<pubDate>Fri, 17 Jul 2009 04:46:00 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=7117</guid>
		<description><![CDATA[CSS is great for styling, but can be agonizing for laying out applications. There have been attempts to do JavaScript powered layout, but what about adding more semantics to CSS itself? Darrel Karisch has posted on just that, with his CSS Scripting Layout: This document describes a new set of CSS properties and object specifications <a href="http://ajaxian.com/archives/css-scripting-layout">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>CSS is great for styling, but can be agonizing for laying out applications. There have been attempts to do JavaScript powered layout, but what about adding more semantics to CSS itself?</p>
<p>Darrel Karisch has posted on just that, with his <a href="http://blogs.eforceglobal.com/dkarisch/archive/2009/07/16/536.aspx">CSS Scripting Layout</a>:</p>
<blockquote><p>
This document describes a new set of CSS properties and object specifications that together compose a powerful declarative means to describe complex arbitrary layout criteria that are both reusable and extensible.  The new properties are Javascript expressions that are woven together in a constraint resolving system to perform a specified layout.  Additionally, a set of global objects defined in the constraint resolution Javascript execution environment enable powerful operations to be expressed succinctly resulting in more readable and compact layout specifications.
</p></blockquote>
<div class="igBar"><a href="javascript:showCodeTxt('css-13');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-13">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">@layout-policy name</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;container-script:”arbitrary Javascript”</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;container-<span style="color: #000000; font-weight: bold;">width</span>:”…”</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;container-<span style="color: #000000; font-weight: bold;">height</span>:”…”</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;rectangle-attributes:”Javascript Associative Array”</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">left</span>:”arbitrary Javascript”</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;horizontal-<span style="color: #993333;">center</span>:”…”</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">right</span>:”…”</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">width</span>:”…”</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">top</span>:”…”</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;vertical-<span style="color: #993333;">center</span>:”…”</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">bottom</span>:”…”</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">height</span>:”…”</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>An prototype implementation has been coded as a Chrome extension, and to get this:</p>
<p><img src="http://blogs.eforceglobal.com/images/blogs_eforceglobal_com/dkarisch/NestedContainers1.JPG"/></p>
<p>you code CSS like this:</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-14');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-14">
<div class="css">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">@layout-policy pack_column {</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">container-script: <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">v</span>ar margin=container.em(0.5);<span style="color: #000099; font-weight: bold;">\</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">"</span>;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">rectangle-attributes: "</span><span style="color:#006600; font-weight:bold;">&#123;</span>\</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">'topOffset'</span>:<span style="color:#800000;">0</span>\</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color: #ff0000;">";</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">horizontal-center:"</span>container.width/2<span style="color: #ff0000;">";</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">top: "</span>rectangle.topOffset+<span style="color: #000000; font-weight: bold;">margin</span>\</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">+<span style="color:#006600; font-weight:bold;">&#40;</span>predecessor ? predecessor<span style="color: #6666ff;">.bottom </span>: <span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color: #ff0000;">";</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">container-height: "</span><span style="color: #000000; font-weight: bold;">margin</span>*<span style="color:#006600; font-weight:bold;">&#40;</span>rectangles.length+<span style="color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>\</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">+rectangles.height.sum+rectangles.topOffset.sum<span style="color: #ff0000;">";</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">container-width: "</span><span style="color:#800000;">2</span>*<span style="color: #000000; font-weight: bold;">margin</span>+rectangles.width.max<span style="color: #ff0000;">";</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">}</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">@layout-policy override {</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">container-script: "</span>\</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">var <span style="color: #000000; font-weight: bold;">margin</span>=container.em<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">0</span>.<span style="color:#800000;">25</span><span style="color:#006600; font-weight:bold;">&#41;</span>\</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">";</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">horizontal-center:none;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">left:"</span><span style="color: #000000; font-weight: bold;">margin</span><span style="color: #ff0000;">";</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">}</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">@layout-policy pack_row {</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">container-script: "</span>\</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">var <span style="color: #000000; font-weight: bold;">margin</span>=<span style="color:#800000;">0</span>;\</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">";</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">vertical-center:"</span>container.height/2<span style="color: #ff0000;">";</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">left:"</span><span style="color: #000000; font-weight: bold;">margin</span>+<span style="color:#006600; font-weight:bold;">&#40;</span>predecessor ? predecessor<span style="color: #6666ff;">.right </span>: <span style="color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color: #ff0000;">";</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">container-width:"</span><span style="color: #000000; font-weight: bold;">margin</span>*<span style="color:#006600; font-weight:bold;">&#40;</span>rectangles.length+<span style="color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span>\</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">+rectangles.width.sum<span style="color: #ff0000;">";</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">container-height:"</span><span style="color:#800000;">2</span>*<span style="color: #000000; font-weight: bold;">margin</span>+rectangles.height.max;<span style="color: #ff0000;">";</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">}</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">.body {</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; layout-policy: 'pack_column';</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; position:relative;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; border:1px black dashed;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; padding:0px;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">}</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">.container {</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; layout-policy: 'pack_row';</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; container-script: "</span><span style="color: #000000; font-weight: bold;">margin</span>=container.ex<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span>;<span style="color: #ff0000;">"; /* apply a margin */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; position:absolute;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; border:1px black solid;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; padding:0px;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;"> }</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">.container1 {</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; layout-policy: 'pack_column override';</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; width:130px;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; position:absolute;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; border:1px black dotted;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; margin:0px;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; padding:0px;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;"> }</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">.text {</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; position:absolute;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; border:1px black dashed;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; padding:0px;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;"> }</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">.extension {</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; rectangle-attributes: "</span><span style="color:#006600; font-weight:bold;">&#123;</span>\</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">'topOffset'</span>:<span style="color: #ff0000;">'container.em(1)+margin'</span>\</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color: #ff0000;">";</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; width:200px;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; padding:10px;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;"> }</span></div>
</li>
<li style="font-weight: bold;color:#26536A;"> </li>
</ol>
</div>
</div>
</div>
<p>Huh. What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/css-scripting-layout/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Google Chrome OS: Web developers rule! :)</title>
		<link>http://ajaxian.com/archives/google-chrome-os-web-developers-rule</link>
		<comments>http://ajaxian.com/archives/google-chrome-os-web-developers-rule#comments</comments>
		<pubDate>Wed, 08 Jul 2009 05:14:00 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=7072</guid>
		<description><![CDATA[Google is getting into the operating system business (again) with Google Chrome OS. Palm put WebKit at the heart of a device with webOS, the Crunchpad talked about it for the netbook, and there have long been desktop-boot-to-browser devices out there. Google Chrome OS goes deeper: Google Chrome OS is an open source, lightweight operating <a href="http://ajaxian.com/archives/google-chrome-os-web-developers-rule">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.onecomics.it/12/09/2008/google-sfida-microsoft-con-chrome/" width="480"><img src="http://farm4.static.flickr.com/3038/2874749029_d8cda4531d.jpg"/></a></p>
<p>Google is getting into the operating system business (<a href="http://android.com/">again</a>) with <a href="http://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html">Google Chrome OS</a>. Palm put WebKit at the heart of a device with webOS, the Crunchpad talked about it for the netbook, and there have long been desktop-boot-to-browser devices out there.</p>
<p>Google Chrome OS goes deeper:</p>
<blockquote><p>
Google Chrome OS is an open source, lightweight operating system that will initially be targeted at netbooks. Later this year we will open-source its code, and netbooks running Google Chrome OS will be available for consumers in the second half of 2010. Because we're already talking to partners about the project, and we'll soon be working with the open source community, we wanted to share our vision now so everyone understands what we are trying to achieve.</p>
<p>Speed, simplicity and security are the key aspects of Google Chrome OS. We're designing the OS to be fast and lightweight, to start up and get you onto the web in a few seconds. The user interface is minimal to stay out of your way, and most of the user experience takes place on the web. And as we did for the Google Chrome browser, we are going back to the basics and completely redesigning the underlying security architecture of the OS so that users don't have to deal with viruses, malware and security updates. It should just work.</p>
<p>Google Chrome OS will run on both x86 as well as ARM chips and we are working with multiple OEMs to bring a number of netbooks to market next year. The software architecture is simple — Google Chrome running within a new windowing system on top of a Linux kernel. For application developers, the web is the platform. All web-based applications will automatically work and new applications can be written using your favorite web technologies. And of course, these apps will run not only on Google Chrome OS, but on any standards-based browser on Windows, Mac and Linux thereby giving developers the largest user base of any platform.
</p></blockquote>
<p>It is interesting that Google pre-announced this so far in advance. Google is very different from other companies, that normally hold back for a release. They instead come out and tell you what they are doing (sometimes) and promise to open source it :)</p>
<p>This is great news for Web developers of course. The Web as a platform continues to push outwards, and we can use our skills to reach more and more folks out there.</p>
<p>There is a reason that we won't see the fruit of this labour for awhile though, and that is because there is a ton of work to be done. I am excited to see us all come together to push the Open Web platform further and get to a point where it can do everything we need to create compelling user experiences!</p>
<p>Some will say that Android and Chrome OS are totally different beasts, but <a href="http://twitter.com/jimpick/status/2527915182">Jim Pick does have a point</a>:</p>
<blockquote><p>
Google now has two competing open source in-house Linux-based operating systems with Webkit browsers. This won't end well.
</p></blockquote>
<p>Competition baybee.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/google-chrome-os-web-developers-rule/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>How JSON Schema is turning out for the Chrome extension APIs</title>
		<link>http://ajaxian.com/archives/jsonschema-chrome</link>
		<comments>http://ajaxian.com/archives/jsonschema-chrome#comments</comments>
		<pubDate>Mon, 20 Apr 2009 10:19:25 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6625</guid>
		<description><![CDATA[When Aaron talked about the Chrome extension API he mentioned how he would see if JSON Schema could help them have a JSON heavy API and allow them to easily validate. He has quickly reported back and is happy with the results. Something like this: PLAIN TEXT JAVASCRIPT: &#160; chromium.tabs.createTab = function&#40;tab, callback&#41; &#123; &#160; <a href="http://ajaxian.com/archives/jsonschema-chrome">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>When Aaron talked about <a href="http://ajaxian.com/archives/chrome-extension-api-how-we-wish-we-have-named-parameters">the Chrome extension API</a> he mentioned how he would see if JSON Schema could help them have a JSON heavy API and allow them to easily validate.</p>
<p>He has quickly <a href="http://www.aaronboodman.com/2009/04/json-schema-part-2.html">reported back</a> and is happy with the results.</p>
<p>Something like this:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-16');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-16">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">chromium.<span style="color: #006600;">tabs</span>.<span style="color: #006600;">createTab</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color:#006600; font-weight:bold;">&#40;</span>tab, callback<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; validate<span style="color:#006600; font-weight:bold;">&#40;</span>arguments, arguments.<span style="color: #006600;">callee</span>.<span style="color: #006600;">params</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; sendRequest<span style="color:#006600; font-weight:bold;">&#40;</span>CreateTab, tab, callback<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">chromium.<span style="color: #006600;">tabs</span>.<span style="color: #006600;">createTab</span>.<span style="color: #006600;">params</span> = <span style="color:#006600; font-weight:bold;">&#91;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; type: <span style="color: #3366CC;">"object"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; properties: <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; windowId: chromium.<span style="color: #006600;">types</span>.<span style="color: #006600;">optPInt</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; url: chromium.<span style="color: #006600;">types</span>.<span style="color: #006600;">optStr</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; selected: chromium.<span style="color: #006600;">types</span>.<span style="color: #006600;">optBool</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; additionalProperties: <span style="color: #003366; font-weight: bold;">false</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; chromium.<span style="color: #006600;">types</span>.<span style="color: #006600;">optFun</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>will give you errors such as:</p>
<blockquote><p>
Invalid value for parameter 0. Property windowId: expected integer, got string.
</p></blockquote>
<p>It will be interesting to see how the APIs look when you go for this style throughout. Looking forward to see more.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/jsonschema-chrome/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Chrome Extension API; How we wish we have named parameters</title>
		<link>http://ajaxian.com/archives/chrome-extension-api-how-we-wish-we-have-named-parameters</link>
		<comments>http://ajaxian.com/archives/chrome-extension-api-how-we-wish-we-have-named-parameters#comments</comments>
		<pubDate>Tue, 07 Apr 2009 11:13:58 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6510</guid>
		<description><![CDATA[PLAIN TEXT JAVASCRIPT: &#160; chromium.tabs.createTab&#40;&#123; &#160;"url": "http://www.google.com/", &#160;"selected": true, &#160;"tabIndex": 3 &#125;&#41;; &#160; This is how you will probably create a new tab using the Chrome extensions API when it comes out. Aaron Boodman talked about the choice and how they are looking to make the APIs look more like this: I'm using the CRUD <a href="http://ajaxian.com/archives/chrome-extension-api-how-we-wish-we-have-named-parameters">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<div class="igBar"><a href="javascript:showCodeTxt('javascript-18');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-18">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">chromium.<span style="color: #006600;">tabs</span>.<span style="color: #006600;">createTab</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #3366CC;">"url"</span>: <span style="color: #3366CC;">"http://www.google.com/"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #3366CC;">"selected"</span>: <span style="color: #003366; font-weight: bold;">true</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #3366CC;">"tabIndex"</span>: <span style="color:#800000;">3</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>This is how you will probably create a new tab using the Chrome extensions API when it comes out.</p>
<p>Aaron Boodman <a href="http://www.aaronboodman.com/2009/04/yo-dawg.html">talked about the choice</a> and how they are looking to make the APIs look more like this:</p>
<blockquote><p>
I'm using the CRUD pattern as a starting point for all the major sub-systems' APIs. My hope is that this will have a number of positive effects:</p>
<ul>
<li>Minimize API design hand-wringing</li>
<li>Provide a large base of functionality quickly</li>
<li>Make it easy for Chromium developers to add new APIs</li>
<li>Make it easy for extension developers to learn new APIs</li>
</ul>
<p>I got this all working for a few methods, and then I got to writing the validation code. I could write the code by hand, but that's so much work. And why bother when somebody has gone and invented JSON Schema.</p>
<p>That's right, it's a schema language for JSON. And of course it has a schema, written in JSON schema. Whee!</p>
<p>So we should be able to just declare the expected structure for our API parameters and push the validate() button. Probably there will have to be extra stuff around the edges, but this should get rid of a majority of the grunt work.
</p></blockquote>
<p>I have found that I favor this approach a lot, and you see the same in libraries such as Prototype (Ruby does a lot of this hash munging too). I wish we could just get named parameters in the language so this all just integrated very nicely indeed. What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/chrome-extension-api-how-we-wish-we-have-named-parameters/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Chrome Extensions and NPAPI</title>
		<link>http://ajaxian.com/archives/chrome-extensions-and-npapi</link>
		<comments>http://ajaxian.com/archives/chrome-extensions-and-npapi#comments</comments>
		<pubDate>Thu, 19 Mar 2009 12:23:07 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=6385</guid>
		<description><![CDATA[There are more details up on the Chrome wiki for how to build a Chrome extension thanks to illustrious Aaron Boodman. You create a JSON manifest in your extension directory, tell Chrome about it via --enable-extensions --load-extension="c:\myextension" (only required while extensions are in dev mode) and then you can navigate to chrome-extension://00123456789ABCDEF0123456789ABCDEF0123456/hello_world.html assuming the manifest <a href="http://ajaxian.com/archives/chrome-extensions-and-npapi">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>There are more details up on the Chrome wiki for <a href="http://dev.chromium.org/developers/design-documents/extensions/howto">how to build a Chrome extension</a> thanks to illustrious Aaron Boodman.</p>
<p>You create a JSON manifest in your extension directory, tell Chrome about it via <code>--enable-extensions --load-extension="c:\myextension"</code> (only required while extensions are in dev mode) and then you can navigate to <code>chrome-extension://00123456789ABCDEF0123456789ABCDEF0123456/hello_world.html</code> assuming the manifest of:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-21');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-21">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"format_version"</span>: <span style="color:#800000;">1</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"id"</span>: <span style="color: #3366CC;">"00123456789ABCDEF0123456789ABCDEF0123456"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"version"</span>: <span style="color: #3366CC;">"1.0"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"name"</span>: <span style="color: #3366CC;">"My First Extension"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"description"</span>: <span style="color: #3366CC;">"The first extension that I made."</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Aaron's work wouldn't be complete with some notion of userscripts, and the document discusses that:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-22');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-22">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"format_version"</span>: <span style="color:#800000;">1</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"id"</span>: <span style="color: #3366CC;">"00123456789ABCDEF0123456789ABCDEF0123456"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"version"</span>: <span style="color: #3366CC;">"1.0"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"name"</span>: <span style="color: #3366CC;">"My First Extension"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"description"</span>: <span style="color: #3366CC;">"The first extension that I made."</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #3366CC;">"content_scripts"</span>: <span style="color:#006600; font-weight:bold;">&#91;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"matches"</span>: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color: #3366CC;">"http://www.google.com/*"</span><span style="color:#006600; font-weight:bold;">&#93;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"js"</span>: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color: #3366CC;">"foo.js"</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Finally, NPAPI plugins are supported for the binary side of the house, and you just need to point to the location of that code via <code>"plugins_dir": "plugins"</code>.</p>
<p>There are also more resources:</p>
<ul>
<li><a href="http://dev.chromium.org/developers/design-documents/extensions/api-pattern">API Pattern</a>
</li>
<li><a href="http://dev.chromium.org/developers/design-documents/extensions/manifest-format">Manifest details</a>
</li>
<li><a href="http://dev.chromium.org/developers/design-documents/extensions/todo-list">Todo list example</a>
</li>
<li><a href="http://dev.chromium.org/developers/design-documents/extensions/userscripts">Userscripts</a>
</li>
</ul>
<p><b>Not your mothers JavaScript</b></p>
<p><img src="http://ajaxian.com/wp-content/uploads/chromeexp.png" alt="" title="chromeexp" width="500" height="455" class="alignnone size-full wp-image-6386" /></p>
<p>The Chrome team has also launched a new website to showcase <a href="http://www.chromeexperiments.com/">interesting web app examples and samples</a>.</p>
<p>Calling it openwebexperiments or something, and being a bit more inclusive would have been nice (since these all seem to work fine in Safari, Firefox, etc ..... but the idea is good!</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/chrome-extensions-and-npapi/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Chrome Extension Process Model Design Doc</title>
		<link>http://ajaxian.com/archives/chrome-extension-process-model-design-doc</link>
		<comments>http://ajaxian.com/archives/chrome-extension-process-model-design-doc#comments</comments>
		<pubDate>Thu, 05 Feb 2009 12:32:23 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=5890</guid>
		<description><![CDATA[The chaps in Chrome land that know a thing or two about writing extensions are getting their design docs on and we see a new draft of how extensions mesh with the process model of Chrome: Chromium extensions will follow a multi-process architecture to share the same kind of stability and security that regular web <a href="http://ajaxian.com/archives/chrome-extension-process-model-design-doc">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>The chaps in Chrome land that know a thing or two about writing extensions are getting their design docs on and we see <a href="http://dev.chromium.org/developers/design-documents/extensions/process-model">a new draft of how extensions mesh with the process model of Chrome</a>:</p>
<blockquote><p>
Chromium extensions will follow a multi-process architecture to share the same kind of stability and security that regular web pages have in Chromium.  All of an extension's code runs in a single process, separate from the browser (with the exception of user scripts which run in whichever renderers they apply to).  Extension code can communicate with user scripts, and vice versa, through a message passing API.
</p></blockquote>
<p>The document discusses an example extension and the "chrome scripts" that pull off the work:</p>
<blockquote><p>
Much like with user scripts, an extension can register "chrome scripts" to run in the context of the extension process.  These scripts have special access to the browser UI, and can communicate with extension UI and user scripts.  Chrome scripts are loaded and run when the extension is loaded (generally on browser startup).  They can register to listen for special events, like tab switching, window closing, navigation, etc.</p>
<p>As an example, consider an Auto-Link extension that shows a button on the toolbar which converts all addresses on the page to links to Google Maps.  Maybe the button is disabled when there are no addresses on the page.  This extension would consist of:</p>
<ol>
<li>a user script which detects addresses and has the ability to convert addresses to links
</li>
<li>a toolstrip containing the HTML, CSS, and script necessary to draw the button
</li>
<li>a chrome script that listens for browser events and controls the state of the toolbar button
</li>
</ol>
<p><b>manifest.json (snippet):</b></p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-27');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-27">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ...</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// these two are loaded into the extension process</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; chrome_scripts: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color: #3366CC;">"chrome/main.js"</span><span style="color:#006600; font-weight:bold;">&#93;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; toolstrip: <span style="color: #3366CC;">"chrome/toolstrip.html"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// this is loaded into renderers</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; user_scripts: <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"matches"</span>: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color: #3366CC;">"http://*/*"</span>, <span style="color: #3366CC;">"https://*/*"</span><span style="color:#006600; font-weight:bold;">&#93;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #3366CC;">"files"</span>: <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color: #3366CC;">"content/address.js"</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ...</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p><b>content/address.js:</b></p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-28');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-28">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">extension.<span style="color: #006600;">addEventListener</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"on-message"</span>, <span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span>e<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>e.<span style="color: #006600;">message</span> == <span style="color: #3366CC;">"autolink"</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; doAutoLink<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>e.<span style="color: #006600;">message</span> == <span style="color: #3366CC;">"check-for-addresses"</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> found = checkForAddresses<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; <span style="color: #009900; font-style: italic;">// implemented elsewhere</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; e.<span style="color: #006600;">channel</span>.<span style="color: #006600;">postMessage</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>hasAddresses: found<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span>, <span style="color: #003366; font-weight: bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p><b>chrome/main.js:</b></p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-29');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-29">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; extension.<span style="color: #006600;">addEventListener</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"tab-changed"</span>, <span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span>e<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// user switched tabs, so check if our button should be enabled</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; e.<span style="color: #006600;">tab</span>.<span style="color: #006600;">postMessage</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"check-for-addresses"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>, <span style="color: #003366; font-weight: bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; extension.<span style="color: #006600;">addEventListener</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"on-message"</span>, <span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span>e<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// we got a response from our user script</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> found = e.<span style="color: #006600;">message</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color: #3366CC;">"hasAddresses"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> toolstrip = e.<span style="color: #006600;">tab</span>.<span style="color: #006600;">browserWindow</span>.<span style="color: #006600;">getToolstrip</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"autolink"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; toolstrip.<span style="color: #006600;">contentWindow</span>.<span style="color: #006600;">document</span>.<span style="color: #006600;">getElementById</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"autolink"</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color: #006600;">disabled</span> = !found;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>, <span style="color: #003366; font-weight: bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p><b>chrome/toolstrip.html:</b></p>
<div class="igBar"><a href="javascript:showCodeTxt('html-30');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">HTML:</span>
<div id="html-30">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/button.html"><span style="color: #000000; font-weight: bold;">&lt;button</span></a> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">"autolink()"</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"autolink"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Auto-Link<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/button&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">&lt;script&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; function autolink() {</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; extension.currentTab.postMessage(&quot;autolink&quot;);</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; }</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/chrome-extension-process-model-design-doc/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>irregexp: New fast Regexp engine in Chrome</title>
		<link>http://ajaxian.com/archives/irregexp-new-fast-regexp-engine-in-chrome</link>
		<comments>http://ajaxian.com/archives/irregexp-new-fast-regexp-engine-in-chrome#comments</comments>
		<pubDate>Wed, 04 Feb 2009 22:19:29 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[regexp]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=5880</guid>
		<description><![CDATA[We are seeing great work with faster JavaScript, but what about faster DOM? Or faster CSS? Or faster libraries? Or faster Regexp? Well, members of the Chrome team have announced irregexp, a faster Regexp engine for Chrome. They go into detail on what they had, what they did, and why they did it. It is <a href="http://ajaxian.com/archives/irregexp-new-fast-regexp-engine-in-chrome">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>We are seeing great work with faster JavaScript, but what about faster DOM? Or faster CSS? Or faster libraries? Or faster Regexp? Well, members of the Chrome team have <a href="http://blog.chromium.org/2009/02/irregexp-google-chromes-new-regexp.html">announced irregexp, a faster Regexp engine for Chrome</a>. They go into detail on what they had, what they did,  and why they did it.</p>
<p>It is also well known that SunSpider tests Regexp that isn't targeted to what is actually done on the Web. The V8 benchmark has updated tests that aim to do a better job here. Being Google, they also have this index laying around, so they took advantage of that to test against popular webpages:</p>
<blockquote><p>
During development we have tested Irregexp against one million of the most popular webpages to ensure that the new implementation stays compatible with our previous implementation and the web. We have also used this data to create a new benchmark which is included in version 3 of the <a href="http://v8.googlecode.com/svn/data/benchmarks/current/run.html">V8 Benchmark Suite</a>. We feel this is a good reflection of what is found on the web.
</p></blockquote>
<p>I would love to see this available for other browsers to test on :)</p>
<p>And now, here are the details on the changes:</p>
<blockquote><p>
While the V8 team has been working hard to improve JavaScript performance, one part of the language that we have so far not given much attention is regexps. Our previous implementation was based on the widely used <a href="http://pcre.org/">PCRE</a> library developed by Philip Hazel at the University of Cambridge. The version we used, known as JSCRE, was adapted and improved by the WebKit project for use with JavaScript. Using JSCRE gave us a regular expression implementation that was compatible with industry standards and has served us well. However, as we've improved other parts of the language, regexps started to stand out as being slower than the rest. We felt it should be possible to improve performance by integrating with our existing infrastructure rather than using an external library. The SquirrelFish team is following a similar approach with their JavaScript engine.</p>
<p>A fundamental decision we made early in the design of Irregexp was that we would be willing to spend extra time compiling a regular expression if that would make running it faster. During compilation Irregexp first converts a regexp into an intermediate <a href="http://en.wikipedia.org/wiki/Automata_theory">automaton</a> representation. This is in many ways the "natural" and most accessible representation and makes it much easier to analyze and optimize the regexp. For instance, when compiling /Sun|Mon/ the automaton representation lets us recognize that both alternatives have an 'n' as their third character. We can quickly scan the input until we find an 'n' and then start to match the regexp two characters earlier. Irregexp looks up to four characters ahead and matches up to four characters at a time.</p>
<p>After optimization we generate native machine code which uses backtracking to try different alternatives. Backtracking can be time-consuming so we use optimizations to avoid as much of it as we can. There are <a href="http://swtch.com/%7Ersc/regexp/regexp1.html">techniques</a> to avoid backtracking altogether but the nature of regexps in JavaScript makes it difficult to apply them in our case, though it is something we may implement in the future.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/irregexp-new-fast-regexp-engine-in-chrome/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Chromium Extensions Design Doc</title>
		<link>http://ajaxian.com/archives/chromium-extensions</link>
		<comments>http://ajaxian.com/archives/chromium-extensions#comments</comments>
		<pubDate>Mon, 01 Dec 2008 06:28:45 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=5268</guid>
		<description><![CDATA[Aaron Boodman posted about the new design document that discusses what the extension system should look like in Chromium and thus Google Chrome: Chromium can't be everything to all people. People use web browsers in a variety of environments and for a wide variety of jobs. Personal tastes and needs vary widely from one user <a href="http://ajaxian.com/archives/chromium-extensions">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Aaron Boodman <a href="http://www.aaronboodman.com/2008/11/extensions-in-chromium.html">posted</a> about the new <a href="http://dev.chromium.org/developers/design-documents/extensions">design document</a> that discusses what the extension system should look like in Chromium and thus Google Chrome:</p>
<blockquote>
<p>Chromium can't be everything to all people. People use web browsers in a variety of environments and for a wide variety of jobs. Personal tastes and needs vary widely from one user to the next. The feature needs of one person often conflict directly with those of another. Further, one of the design goals of Chromium is to have a minimal light-weight user interface, which itself conflicts with adding lots of features.</p>
<p>User-created extensions have been proposed to solve these problems:</p>
<ul>
<li>The addition of features that have specific or limited appeal ("that would be great as an extension").</li>
<li>Users coming from other browsers who are used to certain extensions that they can't live without.</li>
<li>Bundling partners who would like to add features to Chromium specific to their bundle.</li>
</ul>
</blockquote>
<p>They then define the goals:</p>
<blockquote><p>
An extension system for Chromium should be:</p>
<div>
<ul>
<li><span style="font-weight: bold;">Webby</span></li>
</ul>
<ul>
<li>Developing and using extensions should be very similar to developing and using web pages.</li>
<li>We should reuse the web platform wherever possible instead of creating new proprietary APIs.</li>
<li>Web developers should be able to easily create Chromium extensions.</li>
<li>Installing and using an extension should feel lightweight and simple, like using a web app.</li>
</ul>
<li><span style="font-weight: bold;">Rich</span></li>
<ul>
<li>It should be possible to create extensions as polished as if they had been developed by the Chromium team.</li>
<li>Eventually, it should be possible to implement major chunks of Chromium itself as extensions.</li>
</ul>
<li><span style="font-weight: bold;">General</span></li>
<ul>
<li>There should be only one extension system in Chromium that handles all types of extensibility.</li>
<li>Infrastructure like autoupdate, packaging, and security should be shared.</li>
<li>Even traditional NPAPI plugins should be deployable as extensions.</li>
</ul>
<li><span style="font-weight: bold;">Maintainable</span></li>
<ul>
<li>The system should require low ongoing maintenance from the Chromium team, and minimize potential for forward compatibility issues.</li>
<li>We should not need to disable deployed extensions when we release new versions of Chromium.&nbsp;</li>
</ul>
<li><span style="font-weight: bold;">Stable</span></li>
<ul>
<li>Extensions should not be able to crash or hang the browser process.</li>
<li>Chromium should assign blame to extensions that are overusing resources via tools like the task manager and web inspector.</li>
<li>Poorly behaving extensions should be easy to disable.</li>
</ul>
<li><span style="font-weight: bold;">Secure</span></li>
<ul>
<li>It must not be possible for third-party code to get access to privileged APIs because of the extension system.</li>
<li>Extensions should be given only the privileges they require, not everything by default.</li>
<li>Extensions should run in sandboxed processes so that if they are compromised, they can't access the local machine.</li>
<li>It should be trivial for authors to support secure autoupdates for extensions.</li>
<li>We must be able to blacklist extensions across all Chromium installations.</li>
</ul>
<li><span style="font-weight: bold;">Open</span></li>
<ul>
<li>Extension development must not require use of any Google products or services.</li>
<li>Extensions should work the same in Chromium as in Google Chrome.</li>
</ul>
</div>
</blockquote>
<p>As the new kid on the block, they get to learn from the good and bad of other add on systems (IE, Firefox, etc). What would you like to see? I love the idea of being able to do as much as possible by using the Web platform as it is, and doing things like adding some new APIs, but also additions to CSS and the like versus a new system.</p>
<p>I would also love to see the Chromium folks working with others to start sharing some work here. For example, it would be great to have the vbox/hbox work shared. David Hyatt did a lot of work there back in the day with WebKit already.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/chromium-extensions/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Chrom(e&#124;ium) Details: I/O, Responsiveness, UI, and Graphics</title>
		<link>http://ajaxian.com/archives/chromeium-details-io-responsiveness-ui-and-graphics</link>
		<comments>http://ajaxian.com/archives/chromeium-details-io-responsiveness-ui-and-graphics#comments</comments>
		<pubDate>Wed, 29 Oct 2008 13:14:59 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=4913</guid>
		<description><![CDATA[The Google folks have been doing a really good at consistently blogged about the decisions that were made as they created Chrome: Graphics in Google Chrome Google Chrome uses a library called Skia, which is also the graphics engine behind Google's Android mobile OS. The two projects share code that implements WebKit's porting API in <a href="http://ajaxian.com/archives/chromeium-details-io-responsiveness-ui-and-graphics">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>The Google folks have been doing a really good at consistently blogged about the decisions that were made as they created Chrome:</p>
<blockquote><p>
<a href="http://blog.chromium.org/2008/10/graphics-in-google-chrome.html">Graphics in Google Chrome</a></p>
<p>Google Chrome uses a library called Skia, which is also the graphics engine behind Google's Android mobile OS. The two projects share code that implements WebKit's porting API in terms of Skia. Google Chrome also uses Skia to render parts of the user interface such as the toolbar and tab strip. I'm going to talk about some of the history that led us to choose Skia, as well as how our graphics layer works. </p>
<p><a href="http://blog.chromium.org/2008/10/io-in-google-chrome.html">I/O in Google Chrome</a></p>
<p>We moved the I/O onto a number of background threads which allow the user-interface to proceed asynchronously. We did this for large data sources like cookies, bookmarks, and the cache, and also for a myriad of smaller things. Writing a downloaded file to disk, or getting the icons for files in the download manager? The disk operations are being called from a special background thread. Indexing the contents of pages in history or saving a login password? All from background threads. Even the "Save As" dialog box is run from another thread because it can momentarily hang the application while it populates.</p>
<p><a href="http://blog.chromium.org/2008/10/content-not-chrome.html">Content, not 'Chrome'</a></p>
<p>To achieve the streamlined feel we were after, we knew we would have to cut some things, and while we had our own intuitions about what was and wasn't useful in current browsers, we had no idea how those ideas matched to reality. So in typical Google fashion, we turned to data; we ran long studies of the browsing habits of thousands of volunteers, compiled giant charts of what features people did and didn't use, argued over and incorporated that data into our designs and prototypes, ran experiments, watched how our test users reacted, listened to their feedback, and then repeated the cycle over and over and over again.</p>
<p>Even the the more subtle parts of our first-level UI were subjected to similarly intense scrutiny - "what shade of blue best suits XP users", "should the tabs start 18 or 19 pixels below the top of the window?", "what's the correct offset between our buttons?". The answers to these questions were debated and tested for our entire development cycle, and we saw that opinions consistently differed greatly depending on whether we had been Windows 3.1, OS7 or even NeXT users and developers.</p>
<p><a href="http://blog.chromium.org/2008/10/new-approach-to-browser-security-google.html">The Google Chrome Sandbox</a></p>
<p>Google Chrome's multi process architecture allows for a lot of flexibility in the way we do security. The entire HTML rendering and JavaScript execution is isolated to its own class of processes; the renderers. These are the ones that live in the sandbox. We expect to work in the near future with the plug-in vendors to securely sandbox them as well.
</p></blockquote>
<p>I have to admit that I personally wish Cairo was chosen, as having the Google engineers behind that project would have been amazing, and benefit would be had for all of the applications that use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/chromeium-details-io-responsiveness-ui-and-graphics/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Grease up your Chrome; Userscripts coming soon?</title>
		<link>http://ajaxian.com/archives/greasemonkey-chrome</link>
		<comments>http://ajaxian.com/archives/greasemonkey-chrome#comments</comments>
		<pubDate>Thu, 23 Oct 2008 11:16:05 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[userscripts]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=4855</guid>
		<description><![CDATA[One of the beautiful elements of having the Chromium project, is that we get a look ahead of what may be shipping in Google Chrome itself, in the same way that WebKit gives us a hint at Safari.Next. An SVN watcher found a checkin that relates to Greasemonkey-like support: Adds a bit of Greasemonkey support <a href="http://ajaxian.com/archives/greasemonkey-chrome">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p>One of the beautiful elements of having the Chromium project, is that we get a look ahead of what may be shipping in Google Chrome itself, in the same way that WebKit gives us a hint at Safari.Next.</p>
<p>An SVN watcher found <a href="http://codereview.chromium.org/7254">a checkin that relates to Greasemonkey-like support</a>:</p>
<blockquote><p>
Adds a bit of Greasemonkey support hidden behind the <code>--enable-greasemonkey</code> flag.<br />
Implementation follows the pattern of the visited links system.</p>
<p>Things still to be done:</p>
<ul>
<li>stop using a hardcoded script directory</li>
<li>watch script directory and update shared memory when necessary</li>
<li>move file io to background thread</li>
<li>support for @include patterns -- now, all scripts are applied to all pages</li>
</ul>
<p><a href="http://src.chromium.org/viewvc/chrome?view=rev&#038;revision=3496">Committed</a>
</p></blockquote>
<p>It will be interesting to see the level of support for the various APIs, but in general it is fantastic that we have user scripts available in different forms, across browsers. What other platform has that kind of flexibility available to its users?</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/greasemonkey-chrome/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Greasemonkey, Chrome Edition</title>
		<link>http://ajaxian.com/archives/greasemonkey-chrome-edition</link>
		<comments>http://ajaxian.com/archives/greasemonkey-chrome-edition#comments</comments>
		<pubDate>Mon, 20 Oct 2008 22:09:13 +0000</pubDate>
		<dc:creator>Michael Mahemoff</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=4842</guid>
		<description><![CDATA[Chromium gained an important patch over the weekend, with the introduction of Greasemonkey support. The patch came from none other than Aaron Boodman, creator of the original Firefox add-on, and also a Google employee. For now, it's just a patch and it's not yet clear if and when it will be part of the official <a href="http://ajaxian.com/archives/greasemonkey-chrome-edition">Read the rest...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ghacks.net/2008/10/18/google-chrome-adds-greasemonkey-support/"><img src="http://ajaxian.com/wp-content/uploads/chrome.png" alt="" title="chrome" width="164" height="154" class="alignright size-medium wp-image-4848" /></a></p>
<p>Chromium gained an important patch over the weekend, with <a href="http://build.chromium.org/buildbot/snapshots/chromium-rel-xp/">the introduction of Greasemonkey support</a>. The patch came from none other than <a href="http://youngpup.net">Aaron Boodman</a>, creator of the original Firefox add-on, and also a Google employee.</p>
<p>For now, it's just a patch and it's not yet clear if and when it will be part of the official Chrome release. <a href="http://www.ghacks.net/2008/10/18/google-chrome-adds-greasemonkey-support/">As GHacks explains</a>:</p>
<blockquote><p>
Since there is no way of adding extensions to Chrome yet users have to live with some limitations. Only scripts in c:\scripts are loaded and only if the user adds the parameter –enable-greasemonkey by appending it to the program’s shortcut.
</p></blockquote>
<p>The Firefox Greasemonkey extension has been a huge success, and spawned an entire ecosystem of scripts, developers, and users in its own right. Its ultra simplicity has made it immeasurably easier for enthusiasts to "scratch their own back" and patch up a troublesome website in a matter of minutes. It's not hard to see how the pure Javasript approach could be extended to form a more comprehensive extension platform. It will be interesting to see if, <a href="http://softwareas.com/for-browser-extensions-grease-is-the-word">as I speculated on my blog today</a>, this patch is to be the seed for Google's overall approach to Chrome extensions.</p>
<p>In any event, the Chrome space has a lot of user-scripting innovations to look forward to in coming months. And I daresay the odd porting effort too.</p>
]]></content:encoded>
			<wfw:commentRss>http://ajaxian.com/archives/greasemonkey-chrome-edition/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

