Modernizr
Detect (modern) features in the currently used web browser for things like this:
if (Modernizr.awesomeNewFeature) {
showOffAwesomeNewFeature();
} else {
getTheOldLameExperience();
}
This is a browser independent check in the JS code. If a specific browser receives the support for the new feature at some point in the future, nothing will have to be done, to adjust the script for that browser.