• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. The Document Object Model > Using Feature Sensing

Using Feature Sensing

The best way to determine whether the browser that is running your script has what it takes to do the job is to ask it. Finding out whether the browser has the feature(s) you need to use is a lot simpler than it sounds and requires only one added line per function.

In most cases, feature sensing is a better alternative than the more common browser sensing (see "Detecting the Browser's Name and Version" in Chapter 12). If the current version of a browser cannot run your script, who is to say that another, more powerful version of the browser won't be released that can run it? Feature sensing will let any able browser that can run the code run it (Figures 11.14 and 11.15).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint