disconnectedCallback method

  1. @override
void disconnectedCallback()
override

Implementation

@override
void disconnectedCallback() {
  if (_styleSheet != null) {
    ownerDocument.removeStyleSheet(_styleSheet!);
  }
  super.disconnectedCallback();
}