function deconstructComponentInternal(component) {
    if (component) {
      var componentIndex = createdComponents_.indexOf(component);
      createdComponents_.splice(componentIndex, 1);

      var upgrades = component.element_.getAttribute('data-upgraded').split(',');
      var componentPlace = upgrades.indexOf(component[componentConfigProperty_].classAsString);
      upgrades.splice(componentPlace, 1);
      component.element_.setAttribute('data-upgraded', upgrades.join(','));

      var ev = createEvent_('mdl-componentdowngraded', true, false);
      component.element_.dispatchEvent(ev);
    }
  }
function deconstructComponentInternal(component) {
    if (component) {
      var componentIndex = createdComponents_.indexOf(component);
      createdComponents_.splice(componentIndex, 1);

      var upgrades = component.element_.getAttribute('data-upgraded').split(',');
      var componentPlace = upgrades.indexOf(component[componentConfigProperty_].classAsString);
      upgrades.splice(componentPlace, 1);
      component.element_.setAttribute('data-upgraded', upgrades.join(','));

      var ev = createEvent_('mdl-componentdowngraded', true, false);
      component.element_.dispatchEvent(ev);
    }
  }
function deconstructComponentInternal ( component ) { if ( component ) { var componentIndex = createdComponents_ . indexOf ( component ) ; createdComponents_ . splice ( componentIndex , 1 ) ; var upgrades = component . element_ . getAttribute ( 'data-upgraded' ) . split ( ',' ) ; var componentPlace = upgrades . indexOf ( component [ componentConfigProperty_ ] . classAsString ) ; upgrades . splice ( componentPlace , 1 ) ; component . element_ . setAttribute ( 'data-upgraded' , upgrades . join ( ',' ) ) ; var ev = createEvent_ ( 'mdl-componentdowngraded' , true , false ) ; component . element_ . dispatchEvent ( ev ) ; } }
Check the component for the downgrade method.
Execute if found.
Remove component from createdComponents list.

@param {?componentHandler.Component} component
Check the component for the downgrade method . Execute if found . Remove component from createdComponents list .
Deconstructs a component