<?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>dean.edwards.name/weblog</title>
	<atom:link href="http://dean.edwards.name/weblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://dean.edwards.name/weblog</link>
	<description>JavaScript, DHTML and browser hacking</description>
	<lastBuildDate>
	Fri, 03 Feb 2012 23:54:56 +0000	</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.1.18</generator>
	<item>
		<title>IE7.js gets an update</title>
		<link>http://dean.edwards.name/weblog/2010/03/ie7js-update/</link>
				<comments>http://dean.edwards.name/weblog/2010/03/ie7js-update/#comments</comments>
				<pubDate>Sun, 07 Mar 2010 18:48:26 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://dean.edwards.name/weblog/?p=181</guid>
				<description><![CDATA[IE7.js is finally updated! Here are the changes: MSIE5.0 is no longer supported Layout fixes are no longer applied in quirks mode (except for MSIE5.5) IE9.js provides improvements to MSIE8 support for opacity is moved to IE9.js New selectors (IE9.js): :first-of-type :last-of-type :only-of-type :nth-of-type() :nth-last-of-type() :contains() has been removed (no other browser supports it) Changes [&#8230;]]]></description>
								<content:encoded><![CDATA[<p><a href="http://code.google.com/p/ie7-js/">IE7.js</a> is finally updated!</p>
<p>Here are the changes:</p>
<ul>
 <li>MSIE5.0 is no longer supported</li>
 <li>Layout fixes are no longer applied in quirks mode (except for MSIE5.5)</li>
 <li>IE9.js provides improvements to MSIE8</li>
 <li>support for <code>opacity</code> is moved to IE9.js</li>
 <li>New selectors (IE9.js):
  <ul>
   <li><code>:first-of-type</code></li>
   <li><code>:last-of-type</code></li>
   <li><code>:only-of-type</code></li>
   <li><code>:nth-of-type()</code></li>
   <li><code>:nth-last-of-type()</code></li>
  </ul>
 </li>
 <li><code>:contains()</code> has been removed (no other browser supports it)</li>
 <li><a href="http://code.google.com/p/ie7-js/#PNG">Changes to the PNG solution</a></li>
 <li>Lots of <a href="http://code.google.com/p/ie7-js/issues/list?can=1&amp;q=status=Fixed">bugs fixed</a></li>
 <li>New faster and more accurate selector engine (the same as in the upcoming release of base2)</li>
 <li>I think I&#8217;ve fixed the unclickable links problem too<img src="http://dean.edwards.name/weblog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
</ul>
<p>There is a demo page here:</p>
<p><a href="http://ie7-js.googlecode.com/svn/test/index.html">http://ie7-js.googlecode.com/svn/test/index.html</a></p>
<p>And you can download it from here:</p>
<p><a href="http://code.google.com/p/ie7-js/downloads/list">http://code.google.com/p/ie7-js/downloads/list</a></p>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2010/03/ie7js-update/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
							</item>
		<item>
		<title>MSIE&#8217;s document.createStyleSheet() throws an error if there are more than 30 existing style sheets</title>
		<link>http://dean.edwards.name/weblog/2010/02/bug85/</link>
				<comments>http://dean.edwards.name/weblog/2010/02/bug85/#comments</comments>
				<pubDate>Thu, 11 Feb 2010 23:45:17 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://dean.edwards.name/weblog/?p=179</guid>
				<description><![CDATA[I&#8217;m currently doing a round of bug fixing for IE7.js. Bug #85 highlights a bug in Internet Explorer that I was unaware of: &#60;!doctype html&#62; &#60;title&#62;document.createStyleSheet() test&#60;/title&#62; &#60;script&#62; for (var i = 0; i &#60; 32; i++) { document.createStyleSheet(); // throws when i == 31 } &#60;/script&#62; It doesn&#8217;t matter if the style sheets are [&#8230;]]]></description>
								<content:encoded><![CDATA[<p>I&#8217;m currently doing a round of bug fixing for <a href="http://code.google.com/p/ie7-js/">IE7.js</a>.</p>
<p><a href="http://code.google.com/p/ie7-js/issues/detail?id=85">Bug #85</a> highlights a bug in Internet Explorer that I was unaware of:</p>

<pre class="html-multi">
&lt;!doctype html&gt;
&lt;title&gt;document.createStyleSheet() test&lt;/title&gt;
&lt;script&gt;
for (var i = 0; i &lt; 32; i++) {
  document.createStyleSheet(); // throws when i == 31
}
&lt;/script&gt;
</pre>

<p>It doesn&#8217;t matter if the style sheets are created with JavaScript or not. Calling <code>document.createStyleSheet()</code> with 30 existing style sheets will throw the error:</p>

<blockquote>
<p><code>Error: Invalid argument.</code></p>
</blockquote>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2010/02/bug85/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
							</item>
		<item>
		<title>getElementsByTagName()</title>
		<link>http://dean.edwards.name/weblog/2009/12/getelementsbytagname/</link>
				<comments>http://dean.edwards.name/weblog/2009/12/getelementsbytagname/#comments</comments>
				<pubDate>Thu, 17 Dec 2009 01:56:55 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://dean.edwards.name/weblog/?p=156</guid>
				<description><![CDATA[It turns out that document fragments do not implement the getElementsByTagName() method. But they do implement the Selectors API methods: querySelector/querySelectorAll. Nobody cares about this except for people that write JavaScript selector engines. If you are one of those people then keep reading. I can code around the absence of a lot of DOM methods [&#8230;]]]></description>
								<content:encoded><![CDATA[<p>It turns out that <a href="http://ejohn.org/blog/dom-documentfragments/">document fragments</a> do not implement the
 <a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1938918D"><code>getElementsByTagName()</code></a>
 method. But they <em>do</em> implement the <a href="http://www.w3.org/TR/selectors-api/">Selectors
 <abbr>API</abbr></a> methods: <a href="http://www.w3.org/TR/selectors-api/#nodeselector"><code>querySelector/querySelectorAll</code></a>.</p>

<p>Nobody cares about this except for people that write
 <a href="http://paulirish.com/2008/javascript-css-selector-engine-timeline/">JavaScript
 selector engines</a>. If you are one of those people then keep reading.</p>

<p>I can code around the absence of a lot of <abbr>DOM</abbr> methods but
 <code>getElementsByTagName()</code> seemed impossible to do without. So I had to fake it!</p>

<h4>JavaScript performance</h4>

<p>JavaScript is a nice enough scripting language but it is still a scripting language.</p>

<p>For high performance loops you should try to avoid the following:</p>

<ol>
 <li><code>try</code>/<code>catch</code> blocks</li>
 <li>function/method calls (even on native objects)</li>
 <li>accessing <abbr>DOM</abbr> properties (or anything that involves calling a complex getter/setter)</li>
</ol>

<p><strong>Please note</strong> that this is an <em>ordered list</em>.<img src="http://dean.edwards.name/weblog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>

<h4>The code</h4>

<p>With all that in mind I wrote this simple implementation of <code>getElementsByTagName()</code>
 which I hope is fast enough for those edge cases where users execute DOM queries on document fragments:</p>

<pre class="javascript">
function getElementsByTagName(node, tagName) {
  var elements = [], i = 0, anyTag = tagName === "*", next = node.firstChild;
  while ((node = next)) {
    if (anyTag ? node.nodeType === 1 : node.nodeName === tagName) elements[i++] = node;
    next = node.firstChild || node.nextSibling;
    while (!next &amp;&amp; (node = node.parentNode)) next = node.nextSibling;
  }
  return elements;
}
</pre>

<div class="section note">
 <p><b>Update:</b> I&#8217;ve amended the original code based on the comments below.</p>
 <p>Some things to consider:</p>
 <ul>
  <li>Document fragments cannot have a parent node.</li>
  <li>This method will only be used to query document fragments, so you can assume that the context node will not be an element.</li>
 </ul>
</div>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2009/12/getelementsbytagname/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
							</item>
		<item>
		<title>Convert any colour value to hex in MSIE</title>
		<link>http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/</link>
				<comments>http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/#comments</comments>
				<pubDate>Thu, 22 Oct 2009 14:50:24 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://dean.edwards.name/weblog/?p=146</guid>
				<description><![CDATA[The following function will convert any colour value (rgb, named colours, etc) to the hex equivalent in MSIE: function toHex(color) { var body = createPopup().document.body, range = body.createTextRange(); body.style.color = color; var value = range.queryCommandValue("ForeColor"); value = ((value &#038; 0x0000ff) &#60;&#60; 16) &#124; (value &#038; 0x00ff00) &#124; ((value &#038; 0xff0000) &#62;&#62;&#62; 16); value = value.toString(16); [&#8230;]]]></description>
								<content:encoded><![CDATA[<p>The following function will convert any colour value (rgb, named colours, etc) to the hex equivalent in MSIE:</p>

<pre class="javascript">
function toHex(color) {
  var body  = createPopup().document.body,
      range = body.createTextRange();
  body.style.color = color;
  var value = range.queryCommandValue("ForeColor");
  value = ((value & 0x0000ff) &lt;&lt; 16) | (value & 0x00ff00) | ((value & 0xff0000) &gt;&gt;&gt; 16);
  value = value.toString(16);
  return "#000000".slice(0, 7 - value.length) + value;
};
</pre>

<p>For other browsers you can use <code>getComputedStyle()</code> so that is already a solved problem.</p>

<div class="section note">
<p><b>Note:</b> <a href="http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102297">this method</a> has been around for a while. I posted this adaptation because it does not suffer some of the drawbacks of the original.</p>
<p>If you are concerned about performance then you can always re-use the popup and range objects.</p>
</div>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
							</item>
		<item>
		<title>Back in the game</title>
		<link>http://dean.edwards.name/weblog/2009/04/back-in-the-game/</link>
				<comments>http://dean.edwards.name/weblog/2009/04/back-in-the-game/#comments</comments>
				<pubDate>Thu, 23 Apr 2009 01:54:27 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://dean.edwards.name/weblog/?p=138</guid>
				<description><![CDATA[After some wrangling I&#8217;m back in control of the dean.edwards.name domain.]]></description>
								<content:encoded><![CDATA[<p>After some <a href="http://dean.edwards.name/weblog/2009/04/deanedwardsname/">wrangling</a> I&#8217;m back in control of the dean.edwards.name domain.</p>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2009/04/back-in-the-game/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
							</item>
		<item>
		<title>dean.edwards.name</title>
		<link>http://dean.edwards.name/weblog/2009/04/deanedwardsname/</link>
				<comments>http://dean.edwards.name/weblog/2009/04/deanedwardsname/#comments</comments>
				<pubDate>Thu, 02 Apr 2009 21:30:35 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://deanedwards.me.uk/weblog/?p=124</guid>
				<description><![CDATA[Some of you may have noticed that my site is now hosted on a new domain: http://deanedwards.me.uk/ The old domain got squatted. I whined about it on reddit at the time. The squatter is currently hosting my copyrighted material. I wrote to the registrar to complain but haven&#8217;t received a reply (I should probably contact [&#8230;]]]></description>
								<content:encoded><![CDATA[<p>Some of you may have noticed that my site is now hosted on a new domain:</p>
<p><a href="http://deanedwards.me.uk/">http://deanedwards.me.uk/</a></p>
<p>The old domain got squatted. I whined about it on reddit at the time. </p>
<p>The squatter is currently hosting my copyrighted material. I wrote to the registrar to complain but haven&#8217;t received a reply (I should probably contact the hosting service too).</p>
<p>So, if you could update your backlinks/bookmarks etc that would be cool. I know that it&#8217;s my fault though.<img src="http://dean.edwards.name/weblog/wp-includes/images/smilies/icon_sad.gif" alt=":-(" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The old domain was actually worth quite a lot to me. It provided my email address which was the way that people contacted me for work. That email address has provided all of my work for the last five years. There&#8217;s no way I can replace it. I&#8217;ll just have to start again.</p>
<div class="section note">
<p><b>Update:</b> I&#8217;m now in contact with the new owner of the domain and it looks like it may be returned to me. Fingers crossed!</p>
</div>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2009/04/deanedwardsname/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
							</item>
		<item>
		<title>Callbacks vs Events</title>
		<link>http://dean.edwards.name/weblog/2009/03/callbacks-vs-events/</link>
				<comments>http://dean.edwards.name/weblog/2009/03/callbacks-vs-events/#comments</comments>
				<pubDate>Tue, 24 Mar 2009 18:14:38 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://deanedwards.me.uk/weblog/?p=106</guid>
				<description><![CDATA[Most of the major JavaScript libraries claim to support custom events in one form or another. For example, jQuery, YUI and Dojo all support a custom &#8220;document ready&#8221; event. However, the implementation of these custom events is always some form of callback system. A callback system works by storing event handlers in an array. When [&#8230;]]]></description>
								<content:encoded><![CDATA[<p>Most of the major JavaScript libraries claim to support custom events in one form or another.
 For example, jQuery, YUI and Dojo all support a custom &#8220;document ready&#8221; event. However, the implementation
 of these custom events is always some form of callback system.</p>

<p>A callback system works by storing event handlers in an array. When the underlying event is detected the dispatch system loops through the array calling the callback functions in turn. So what&#8217;s wrong with that? Before I answer that, let&#8217;s look at some code.</p>

<p>Here is some simple code that uses the <code>DOMContentLoaded</code> event to perform two
separate initialisations:</p>

<pre class="javascript">
document.addEventListener("DOMContentLoaded", function() {
  console.log("Init: 1");
  DOES_NOT_EXIST++; // this will throw an error
}, false);

document.addEventListener("DOMContentLoaded", function() {
  console.log("Init: 2");
}, false);
</pre>

<p>What do you expect to see in the console when the document is loaded?</p>
<p>Well, you should see this (or something like it):</p>

<pre>
Init: 1

Error: DOES_NOT_EXIST is not defined

Init: 2
</pre>

<p>The point is, both functions are executed. You get an error in the first function <em>but it does not
stop the second function from executing</em>.</p>

<h4>The Problem</h4>

<p>Now let&#8217;s look at some code based on a callback system. I&#8217;ll pick on jQuery because it&#8217;s the most popular:</p>

<pre class="javascript">
$(document).ready(function() {
  console.log("Init: 1");
  DOES_NOT_EXIST++; // this will throw an error
});

$(document).ready(function() {
  console.log("Init: 2");
});
</pre>

<p>What do we see in the console?</p>

<pre>
Init: 1

Error: DOES_NOT_EXIST is not defined
</pre>

<p>The problem is clear. <em>Callback systems are brittle</em>. If any of the callback functions throw
 an error then the subsequent callbacks are not executed. In reality, this means that a poorly written
 plugin can prevent other plugins from initialising.</p>
 
<p>Dojo suffers exactly the same problem as jQuery. The YUI library takes a slightly different approach.
 It wraps a try/catch around its dispatch mechanism. The downside is that your errors occur
 silently:</p>

<pre class="javascript">
YAHOO.util.Event.onDOMReady(function() {
  console.log("Init: 1");
  DOES_NOT_EXIST++; // this will throw an error
});

YAHOO.util.Event.onDOMReady(function() {
  console.log("Init: 2");
});
</pre>

<p>Produces:</p>

<pre>
Init: 1

Init: 2
</pre>

<p>Perfect initialisation! Nothing to worry about here! Except for the error that you don&#8217;t see.</p>

<p>So what&#8217;s the solution?</p>

<h4>The Solution</h4>

<p>The solution is to use a hybrid of a callback system and real event dispatch.
 We can trigger a fake event and from within that event, run the callback function.
 Each event handler has its own execution context. If an error occurs in our fake event
 then it won&#8217;t affect our callback system.</p>
 
<p>That sounds a bit complicated. I&#8217;ll illustrate with some code.</p>

<pre class="javascript">
var currentHandler;

if (document.addEventListener) {
  document.addEventListener("fakeEvents", function() {
    // execute the callback
    currentHandler();
  }, false);

  var dispatchFakeEvent = function() {
    var fakeEvent = document.createEvent("UIEvents");
    fakeEvent.initEvent("fakeEvents", false, false);
    document.dispatchEvent(fakeEvent);
  };
} else { // MSIE

  // I'll show this code later
}

var onLoadHandlers = [];
function addOnLoad(handler) {
  onLoadHandlers.push(handler);
};

onload = function() {
  for (var i = 0; i &lt; onLoadHandlers.length; i++) {
    currentHandler = onLoadHandlers[i];
    dispatchFakeEvent();
  }
};
</pre>

<p>Now we&#8217;ll use the code above to attach our two troublesome event handlers:</p>

<pre class="javascript">
addOnLoad(function() {
  console.log("Init: 1");
  DOES_NOT_EXIST++; // this will throw an error
});

addOnLoad(function() {
  console.log("Init: 2");
});
</pre>

<p>OK. Let&#8217;s run the code above and see what we get:</p>

<pre>
Init: 1

Error: DOES_NOT_EXIST is not defined

Init: 2
</pre>

<p>Perfect! Just what we want. Both event handlers are executed and we also get a message
 telling us about the error in the first handler. Great!</p>
 
<p>But what about Internet Explorer I hear you ask (I have good hearing). MSIE does not support
 the standard event dispatch system. It has its own method; <code>fireEvent</code> but that only
 works with real events (e.g. <code>click</code>).</p>
 
<p>Rather than explain the solution in words, here is the code:</p>

<pre class="javascript">
var currentHandler;

if (document.addEventListener) {

  // We've seen this code already

} else if (document.attachEvent) { // MSIE

  document.documentElement.fakeEvents = 0; // an expando property

  document.documentElement.attachEvent("onpropertychange", function(event) {
    if (event.propertyName == "fakeEvents") {
      // execute the callback
      currentHandler();
    }
  });

  dispatchFakeEvent = function(handler) {
    // fire the propertychange event
    document.documentElement.fakeEvents++;
  };
}
</pre>

<p>A similar approach except that we use the proprietary <code>propertychange</code> event as the trigger.</p>
 
<h4>Summary</h4>

<p>I&#8217;ve shown a very simple example of how to use the uderlying event system to fire custom
 events. Library authors should be capable of seeing how this can be extended to fully support
 cross-browser custom events.</p>
 
<h4>Update</h4>

<p>Some commenters have suggested using <code>setTimeout</code>. Here is my response to that:</p>

<blockquote><p>For this particular example, a timer will work fine. This is just an example to illustrate the technique. The real usefulness of this is for other custom events. Most libraries implement custom events using a callback system. As I illustrated, callback systems are brittle. Dispatching events with timers will work to a degree but it is not how a real event system works. In a real system, events are dispatched sequentially. There are other concerns, like cancelling an event and stopping the event from bubbling. This would be impossible with timers.</p></blockquote>

<p>The important thing is that I&#8217;ve demonstrated a technique for wrapping a callback system in a real event dispatch system. That gives you the ability to fire <em>real</em> custom events in MSIE. If you are building an event system based on event delegation then this technique may also be interesting to you.</p>

<h4>Update 2</h4>

<p>It seems that Prototype uses an almost identical trick to fire custom events in MSIE:</p>
<p><a href="http://andrewdupont.net/2009/03/24/link-dean-edwards/">http://andrewdupont.net/2009/03/24/link-dean-edwards/</a></p>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2009/03/callbacks-vs-events/feed/</wfw:commentRss>
		<slash:comments>67</slash:comments>
							</item>
		<item>
		<title>Two steps forward one step back</title>
		<link>http://dean.edwards.name/weblog/2008/03/steps/</link>
				<comments>http://dean.edwards.name/weblog/2008/03/steps/#comments</comments>
				<pubDate>Sat, 22 Mar 2008 20:47:03 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://dean.edwards.name/weblog/2008/03/steps/</guid>
				<description><![CDATA[Safari 3.1 fails the Acid2 test: http://bugs.webkit.org/show_bug.cgi?id=13693]]></description>
								<content:encoded><![CDATA[<p>Safari 3.1 fails the Acid2 test:</p>

<p><a href="http://bugs.webkit.org/show_bug.cgi?id=13693">http://bugs.webkit.org/show_bug.cgi?id=13693</a></p>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2008/03/steps/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
							</item>
		<item>
		<title>Quotes</title>
		<link>http://dean.edwards.name/weblog/2008/01/quotes/</link>
				<comments>http://dean.edwards.name/weblog/2008/01/quotes/#comments</comments>
				<pubDate>Tue, 22 Jan 2008 23:57:17 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://dean.edwards.name/weblog/2008/01/quotes/</guid>
				<description><![CDATA[..we worked together with The Web Standards Project (in the WaSP-Microsoft Task Force) on this problem. I can&#8217;t give them enough credit for this work; Chris Wilson (Microsoft) Although members of the WaSP Microsoft Task Force were very much involved in this proposal, it is important to re-emphasise that this proposal is not one that [&#8230;]]]></description>
								<content:encoded><![CDATA[<blockquote cite="http://blogs.msdn.com/ie/archive/2008/01/21/compatibility-and-ie8.aspx">
 <p>..we worked together with The Web Standards Project (in the WaSP-Microsoft Task Force) on this problem.
  I can&#8217;t give them enough credit for this work;</p>
 <address><a href="http://blogs.msdn.com/ie/archive/2008/01/21/compatibility-and-ie8.aspx">Chris Wilson (Microsoft)</a></address>
</blockquote>

<blockquote cite="http://www.webstandards.org/2008/01/22/microsofts-version-targeting-proposal/">
 <p>Although members of the WaSP Microsoft Task Force were very much involved in this proposal,
  it is important to re-emphasise that this proposal is not one that every member of the Web Standards Project
  necessarily backs by default.</p>
 <address><a href="http://www.webstandards.org/2008/01/22/microsofts-version-targeting-proposal/">Drew McLellan (WaSP co-lead)</a></address>
</blockquote>

<blockquote cite="http://alistapart.com/articles/beyonddoctype">
 <p>I, for one, hope other browser vendors join Microsoft in implementing this functionality.</p>
 <address><a href="http://alistapart.com/articles/beyonddoctype">Aaron Gustafson (WaSP/MSTF)</a></address>
</blockquote>

<blockquote>
 <p>I won&#8217;t support any more cruft added to HTML without hearing the reasons.
  &#8220;Don&#8217;t break the Web&#8221; is a way to befuddle us.
  Tell us what your real concerns are and we will try to help.
  We are not here to rubber-stamp the first crazy idea that you come up with.</p>
 <address>Dean Edwards on the WaSP/MSTF private mailing list</address>
</blockquote>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2008/01/quotes/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
							</item>
		<item>
		<title>IE7.js version 2.0 (beta)</title>
		<link>http://dean.edwards.name/weblog/2008/01/ie7-2/</link>
				<comments>http://dean.edwards.name/weblog/2008/01/ie7-2/#comments</comments>
				<pubDate>Sun, 06 Jan 2008 21:02:25 +0000</pubDate>
		<dc:creator><![CDATA[-dean]]></dc:creator>
		
		<guid isPermaLink="false">http://dean.edwards.name/weblog/2008/01/ie7-2/</guid>
				<description><![CDATA[I&#8217;ve finally updated my IE7 library. IE7 was in alpha for a long time. The last version was very stable but I always intended to issue a serious update. The release of the real IE7 browser threw me off course a little and then I got bogged down with base2. I&#8217;ve made some important changes [&#8230;]]]></description>
								<content:encoded><![CDATA[<p>I&#8217;ve finally updated my <a href="http://dean.edwards.name/IE7/">IE7 library</a>.<img src="http://dean.edwards.name/weblog/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>IE7 was in alpha for a long time. The last version was very stable but I always intended to issue a serious update.
 The release of the real IE7 browser threw me off course a little and then I got bogged down with <a href="http://code.google.com/p/base2/">base2</a>.</p>
<p>I&#8217;ve made some important changes to the script which I&#8217;ll now outline.</p>
<ul>
<li>The IE7 project is now <a href="http://code.google.com/p/ie7-js/">hosted on googlecode</a> (I got fed up with <a href="https://sourceforge.net/">SourceForge</a>).</li>
<li>IE7 is no longer modular. Instead I&#8217;ve merged the scripts into two: IE7.js and IE8.js</li>
<li>IE7.js includes <em>only</em> fixes that are included in the real MSIE7 browser.</li>
<li>All other enhancements are moved to IE8.js.</li>
<li>IE7 is now much smaller (11KB gzipped).</li>
<li>IE7 is now much faster (it uses the selector engine from <a href="http://dean.edwards.name/weblog/2007/03/yet-another/">base2.DOM</a>)</li>
<li>There are no dependencies on other files (except <code>blank.gif</code>)</li>
<li>You can <a href="http://ie7-js.googlecode.com/svn/version/">hotlink</a> IE7/IE8.js directly from Google&#8217;s servers (usage instructions below)</li>
</ul>
<p>Some fixes are removed completely:</p>
<ul>
<li>the <code>:root</code> selector</li>
<li>support for <abbr title="eXtensible Markup Language">XML</abbr> files</li>
<li>support for CSS namespaces</li>
<li>the <a href="http://dean.edwards.name/weblog/2005/06/base64-ie/">fix for base64 encoded images</a></li>
</ul>
<h4>Usage</h4>
<p>You can link directly to the files on google:</p>
<p><a href="http://ie7-js.googlecode.com/svn/version/">http://ie7-js.googlecode.com/svn/version/</a></p>
<p>To upgrade MSIE5-6 to MSIE7 include the following in the <code>&lt;head&gt;</code> of your page:</p>
<pre>
&lt;!--[if lt IE 7]&gt;
&lt;script src=&quot;http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p>To upgrade MSIE5-7 with advanced <abbr title="Cascading Style Sheets">CSS</abbr> features missing from MSIE7 use the following:</p>
<pre>
&lt;!--[if lt IE 8]&gt;
&lt;script src=&quot;http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p><em>You do not need to include IE7.js if you are using IE8.js.</em></p>
<h4>Demo</h4>
<p><a href="http://ie7-js.googlecode.com/svn/test/index.html" title="IE7 project home">http://ie7-js.googlecode.com/svn/test/index.html</a></p>
<h4>Links</h4>
<p>The new home of the IE7 project is:</p>
<p><a href="http://code.google.com/p/ie7-js/" title="IE7 project home">http://code.google.com/p/ie7-js/</a></p>
<p>And I&#8217;ve created a Google Group for discussion and questions:</p>
<p><a href="http://groups.google.com/group/ie7-js" title="IE7 discussion group">http://groups.google.com/group/ie7-js</a></p>]]></content:encoded>
							<wfw:commentRss>http://dean.edwards.name/weblog/2008/01/ie7-2/feed/</wfw:commentRss>
		<slash:comments>210</slash:comments>
							</item>
	</channel>
</rss>
