.getParent(selector?)
Available on: InDomReturns the InDom object for the closest ancestor (or direct parent if no selector) that matches the selector.
Returns null if nothing is found.Parameters:
Returns null if nothing is found.Parameters:
selector {string} (optional) - CSS selector to test against ancestors.
Returns: {InDom | null} - InDom object, or null when not foundThrows: Error - If the underlying element has been removed
Examples:const span = $1('.example>div>span');
console.log(span.getParent().getHtml());
// <span>this is a first test</span>
console.log(span.getParent('.example').getHtml());
// <div> <span>this is a first test</span></div>...Next: getSelfOrParent »