This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Recursively searches the startObject for the given value. | |
* | |
* All matches are displayed in the browser console and stored in the global variable "gsResults" | |
* The function tries to simplify DOM element names by using their ID, when possible. | |
* | |
* Usage samples: | |
* | |
* globalSearch( document, 'someValue' ); // Search entire DOM document for the string value. | |
* globalSearch( document, '^start' ); // Simple regex search (function recognizes prefix/suffix patterns: "^..." or "...$"). |