Wednesday 11 January 2012

Using Modinizer

Modinizer is a great new javascript library for detecting browser features without having to write too much unnecessary code for abstracting cross-browser compatibilities. For example rounded corners is a feature that was desired for many UX (user experience) developers and before CSS3 could only be accomplished with javascript hackery. Now with modinizer it is possible to detect using the library whether the feature is enabled and code corresponding classes appropriately. When modinizer is included on a page it dynamically updates the HTML class attribute with a set of classes that identify what that browser understands, e.g. multiplebgs = multiple backgrounds, or no-multiplebgs meaning doesn't support multiple backgrounds. Allowing you the developer to code accordingly for both scenarios and thus future proof your web application. The same also applies to new HTML5 elements such as video, and localstorage. A quick Modiziner.localStorage test will reveal whether or not the browser supports that.

No comments:

Post a Comment