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.
Listing 1//Old browser safe way to refernce DOM elementvar editContactCommand = document.getElementById('editContact');editContactCommand.disabled = true;//New way taking advantage of IE10 id quirkeditContact.disabled = true;
Philip Japikse is an international speaker, a Microsoft MVP, ASPInsider, INETA Community Champion, MCSD, CSM/ CSP, and a passionate member of the developer community. Phil 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 also hosts the Hallway Conversations podcast (www.hallwayconversations.com) and serves as 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, or read his personal blog at www.skimedic.com/blog.
Subscribe to be the first to get our expert-written articles and tutorials for developers!