Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this Wrox Blox, I cover a few of the base2 JavaScript framework's most useful features and its biggest innovations in seamlessly patching cross-browser standards compliance issues across the most popular browsers. I'll begin with some pointers on programming conventions and best practices that will help you write your code more consistently and efficiently. Then I recap the JavaScript event APIs as supported by modern browsers, so you can understand the problems that client-side developers face when writing events into their web applications without the help of a JavaScript framework. You'll then be instructed on how to install the base2 JavaScript framework and test that your installation works. That's followed by a demonstration of how base2 makes the W3C's standard event API ubiquitously available in all modern browsers, including Internet Explorer, which is not capable of supporting the W3C event API without base2's help.
base2 strives to provide standards compliance between browsers, such that a browser's native abilities are rendered moot and inconsequential. Another innovative feature of base2 is how it provides the W3C Selectors API seamlessly and harmoniously between browsers. The W3C Selectors API gives you the ability to select elements from the JavaScript DOM just as you would with Cascading Style Sheet (CSS) selectors. The W3C Selectors API has only just been natively implemented in Firefox 3.1, Internet Explorer 8, Safari 3, and Opera 10. base2 leverages both the native support for this API, when it is available, and its own implementation when it is not. base2 also beefs up browser support of this API where necessary, such as supporting more selector syntax than the browser itself supports natively when necessary.