Raster.findParentExpando( element, expandoName [, all] )

Scans up the DOM herachy starting at the given element searching for the first parent having the given expando name, then returns the value of the expando.

If the all argument is set to true, the function searches and collect all matching expandos (not just the first match), and returns an array containing all expandos found, or an empty array if no matches were found.

Parameters

Name Type   Description
element object DOM Element where the search starts
expandoName string Name of the expando to be looked up. This value is case sensitive.
all boolean optional True scans all parents and returns an array with all the matching parents having the requested expando. False (or omitting this argument) returns only the first match.

Returns

Type Description
object Null is no parent with the given expando name was found. If the given element has the given expando name, the element itself is returned. If all is specified, list of all expando matches found. An empty array if no matches are found.
Home Examples Download License
 
Copyright © 2010-2017 Edwin R. López