Example F

Complete Well-Behaved Dynamic Label Script - Safari Update

This page demonstrates an update to our completed script in Example E to test for a bug in Safari.

The code is identical to Example E, except for the following small change to our feature test function:

function supportsDynamicLabels() {
  return document.getElementById && 
    (window.attachEvent || window.addEventListener) && 
    null == navigator.appVersion.match(/Safari\/\d+$/);