code: function onDestroy() {
      this.properties._internalState.propertyListeners = null;
      this.properties._internalState.onDestroyCalled = true;
      this.properties._internalState.disableSetters = true;
      this.properties._layerEventSubscriptions
        .forEach(subscribedObject => subscribedObject.off(null, null, this));
      this.properties._layerEventSubscriptions = [];
      this.classList.add('layer-node-destroyed');
    }
docs: MIXIN HOOK: Add a `onDestroy` method to your component which will be called when your component has been removed fromt the DOM.
  
  Use this instead of the WebComponents reserved `detachedCallback`.  The reserved method
  takes care of unsubscribing from events from all Layer.Core.Root instances before calling `onDestroy`.
  
  Your `onDestroy` callback will run after the node has been removed from the document
  for at least 10 seconds, or after a call to {@link #destroy}.
  See the {@link #event-layer-widget-destroyed} event to prevent the widget from being destroyed after removing
  it from the document.
  
  @method onDestroy