Class: Cloud5Element

Cloud5Element()

Base class for Cloud5 overlay-like elements. Currently lightweight, but centralizes a few common conventions:

  • Optional data-cloud5-stay-visible attribute parsed into cloud5_stay_visible.
  • Optional on_shown() / on_hidden() lifecycle hooks.

Subclasses should call super.connectedCallback() if they override it.

Constructor

new Cloud5Element()

Source:

Methods

cloud5_refresh_dom_from_state()

Applies data-cloud5-bind updates for this element.

Source:

on_clear()

Optional lifecycle hook called by the piece when it is cleared. Subclasses may override this method to change behavior when the piece is cleared, such as clearing any performance-related internal state in preparation for a new performance.

Source:

on_generate()

Optional lifecycle hook called by the piece when it generates a new Score. Subclasses may override this method to add new Events to the Score, or to modify existing Events.

Source:

on_hidden()

Optional lifecycle hook called by the piece when this element is hidden. Subclasses may override this method to change behavior when hidden.

Source:

on_play()

Optional lifecycle hook called by the piece when it starts its performance. Subclasses may override this method to change behavior when the piece starts, such as to schedule real-time events.

Source:

on_shown()

Optional lifecycle hook called by the piece when this element is shown. Subclasses may override this method to change behavior when shown.

Source:

on_state_restored()

Optional lifecycle hook called after a persisted state has been restored into this element (or the owning piece).

Default behavior: update any DOM elements that declare a data-cloud5-bind="path" attribute, where path is resolved relative to this.

Subclasses may override. If you still want the default binding behavior, call super.on_state_restored(restored_state).

Source:

on_stop()

Optional lifecycle hook called by the piece when it stops its performance. Subclasses may override this method to change behavior when the piece stops.

Source: