packages/mip/src/base-element.js
function lastChildElement (parent, callback) {
  for (let child = parent.lastElementChild; child; child = child.previousElementSibling) {
    if (callback(child)) {
      return child
    }
  }
  return null
}
function lastChildElement (parent, callback) {
  for (let child = parent.lastElementChild; child; child = child.previousElementSibling) {
    if (callback(child)) {
      return child
    }
  }
  return null
}
function lastChildElement ( parent , callback ) { for ( let child = parent . lastElementChild ; child ; child = child . previousElementSibling ) { if ( callback ( child ) ) { return child } } return null }
Finds the last child element that satisfies the callback.
@param {!Element} parent
@param {function(!Element):boolean} callback
@return {?Element}
Finds the last child element that satisfies the callback .