Windows 8 Store applications have the benefit of only running in IE10 based technology. This means that applications only have to be tested in Windows 8, but it also means that developers can use IE10 quirks to their advantage.
My favorite “quirk” in IE10 is the ability to reference HTML elements by their id attribute as if the id was a global variable. So instead of referencing DOM elements by calling document.getElementById(‘contactdetail’), you can reference them directly by just using the id. This is shown in Listing 1.
//Old browser safe way to refernce DOM element
var editContactCommand = document.getElementById('editContact');
editContactCommand.disabled = true;
//New way taking advantage of IE10 id quirk
editContact.disabled = true;
About the author
||Philip Japikse an international speaker, a Microsoft MVP, INETA Community Champion, MCSD, CSM/ CSP, and a passionate member of the developer community, Phil Japikse has been working with .Net since the first betas, developing software for over 20 years, and heavily involved in the agile community since 2005. Phil works as a Developer Evangelist for Telerik's RadControls for Windows 8 as well as the Just family of products (JustCode, JustMock, JustTrace, and JustDecompile) and co-hosts the Hallway Conversations podcast (www.hallwayconversations.com). Phil is also the Lead Director for the Cincinnati .Net User’s Group (http://www.cinnug.org). You can follow Phil on twitter via www.twitter.com/skimedic read his Telerik blog at http://blogs.telerik.com/skimedic and his personal blog at www.skimedic.com/blog.