@@ -529,14 +529,15 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
529529 }
530530 } ,
531531
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.
534535 *
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`.
540541 */
541542 getClosest : function getClosest ( el , validateWith , onlyParent ) {
542543 if ( angular . isString ( validateWith ) ) {
@@ -561,6 +562,9 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
561562
562563 /**
563564 * Build polyfill for the Node.contains feature (if needed)
565+ * @param {Node } node
566+ * @param {Node } child
567+ * @returns {Node }
564568 */
565569 elementContains : function ( node , child ) {
566570 var hasContains = ( window . Node && window . Node . prototype && Node . prototype . contains ) ;
@@ -576,10 +580,10 @@ function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $in
576580 * Functional equivalent for $element.filter(‘md-bottom-sheet’)
577581 * useful with interimElements where the element and its container are important...
578582 *
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
583587 */
584588 extractElementByName : function ( element , nodeName , scanDeep , warnNotFound ) {
585589 var found = scanTree ( element ) ;
0 commit comments