export default function mdlUpgrade(Constructor) {

  class NewConstructor extends Constructor {

    connectedCallback() {
      window.componentHandler.upgradeElement(this);
      return super.connectedCallback();
    };

    disconnectedCallback() {
      window.componentHandler.downgradeElements(this);
      return super.disconnectedCallback();
    };

  }

  return NewConstructor;
}

export default function mdlUpgrade(Constructor) {

  class NewConstructor extends Constructor {

    connectedCallback() {
      // super.connectedCallback();
      window.componentHandler.upgradeElement(this);
    };

    disconnectedCallback() {
      super.disconnectedCallback();
      window.componentHandler.downgradeElements(this);
    };

  }

  return NewConstructor;
}

Call connectedCallback before upGrade component.
Call connectedCallback before upGrade component.
