WebComponent

org.getshaka.shaka.WebComponent
See theWebComponent companion object
trait WebComponent extends Component

A [[Component]] wrapped in a Custom Element. Custom Elements have useful lifecycle callbacks and can attach shadow-dom.

Attributes

See also
Companion
object
Graph
Supertypes
trait Component
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def connectedCallback(): Unit

Triggered whenever this WebComponent is appended into a document-connected element. WebComponent ensures connectedCallback is never triggered when the element is not connected (a non-obvious behavior of regular custom elements).

Triggered whenever this WebComponent is appended into a document-connected element. WebComponent ensures connectedCallback is never triggered when the element is not connected (a non-obvious behavior of regular custom elements).

Attributes

See also
def disconnectedCallback(): Unit

Invoked each time the custom element is disconnected from the document's DOM.

Invoked each time the custom element is disconnected from the document's DOM.

Attributes

See also
override def render(using parentElement: Element, parentBinding: Binding[_]): Unit

Renders this Component's template. render should only be overriden when implementing new Component types. For example, [[WebComponent]] overrides render to wrap super.render in a Custom Element, allowing you to use shadow-dom and lifecycle callbacks.

Renders this Component's template. render should only be overriden when implementing new Component types. For example, [[WebComponent]] overrides render to wrap super.render in a Custom Element, allowing you to use shadow-dom and lifecycle callbacks.

Attributes

Definition Classes

Whether this WebComponent should use ShadowDom and/or scoped styles. Defaults to Disabled.

Whether this WebComponent should use ShadowDom and/or scoped styles. Defaults to Disabled.

Shadow Dom means that means ids, class names, and selectors can be used without fear of conflicts.

Attributes

See also

Inherited methods

def template: Frag

Defines the component's template.

Defines the component's template.

Attributes

Inherited from:
Component