Prototype This page is part of the Prototype JavaScript framework documentation.
Overview | (...)

The Prototype Try.these function tries each function supplied in the argument list until one of them works.

Syntax

Try.these( function1, function2, [...], functionN );

Examples

Basic usage:

function getXmlNodeValue(xmlNode){
  return Try.these(
    function() {return xmlNode.text;},
    function() {return xmlNode.textContent;}
  );
}