17.6. Coping when deferred binding isn’t enough

Way back in section 17.3.4, we briefly looked at a new property introduced for HTML 5 widgets that allows you to defer binding out the widget in IE6 and IE8 because you know those two browsers don’t support HTML 5 widgets, such as Audio.

But it’s not so clear cut that all the other browsers do. Certainly the later versions do, but in earlier versions the support is patchy and inconsistent across the different browser versions. You could break up user.agent into smaller and smaller granularity until you’re at point releases—but then you’d have a huge number of permutations.

Instead, the Audio widget uses this property to select the correct version of an inner class—AudioElementSupportDetector ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.