@@ -529,14 +529,15 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
529
529
}
530
530
} ,
531
531
532
- /*
533
- * getClosest replicates jQuery.closest() to walk up the DOM tree until it finds a matching nodeName
532
+ /**
533
+ * getClosest replicates jQuery.closest() to walk up the DOM tree until it finds a matching
534
+ * nodeName.
534
535
*
535
- * @param el Element to start walking the DOM from
536
- * @param check Either a string or a function. If a string is passed, it will be evaluated against
537
- * each of the parent nodes' tag name. If a function is passed, the loop will call it with each of
538
- * the parents and will use the return value to determine whether the node is a match.
539
- * @param onlyParent Only start checking from the parent element, not `el`.
536
+ * @param { Node } el Element to start walking the DOM from
537
+ * @param { string| function } validateWith If a string is passed, it will be evaluated against
538
+ * each of the parent nodes' tag name. If a function is passed, the loop will call it with each
539
+ * of the parents and will use the return value to determine whether the node is a match.
540
+ * @param { boolean } onlyParent Only start checking from the parent element, not `el`.
540
541
*/
541
542
getClosest : function getClosest ( el , validateWith , onlyParent ) {
542
543
if ( angular . isString ( validateWith ) ) {
@@ -561,6 +562,9 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
561
562
562
563
/**
563
564
* Build polyfill for the Node.contains feature (if needed)
565
+ * @param {Node } node
566
+ * @param {Node } child
567
+ * @returns {Node }
564
568
*/
565
569
elementContains : function ( node , child ) {
566
570
var hasContains = ( window . Node && window . Node . prototype && Node . prototype . contains ) ;
@@ -576,10 +580,10 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
576
580
* Functional equivalent for $element.filter(‘md-bottom-sheet’)
577
581
* useful with interimElements where the element and its container are important...
578
582
*
579
- * @param {[] } elements to scan
580
- * @param {string } name of node to find (e.g. 'md-dialog')
581
- * @param {boolean= } optional flag to allow deep scans; defaults to 'false'.
582
- * @param {boolean= } optional flag to enable log warnings; defaults to false
583
+ * @param {angular.JQLite } element to scan
584
+ * @param {string } nodeName of node to find (e.g. 'md-dialog')
585
+ * @param {boolean= } scanDeep optional flag to allow deep scans; defaults to 'false'.
586
+ * @param {boolean= } warnNotFound optional flag to enable log warnings; defaults to false
583
587
*/
584
588
extractElementByName : function ( element , nodeName , scanDeep , warnNotFound ) {
585
589
var found = scanTree ( element ) ;
0 commit comments