Ibyar/Aurora
    Preparing search index...

    Interface BaseComponent<T>

    Custom Elements

    One of the key features of web components is the ability to create custom elements: that is, HTML elements whose behavior is defined by the web developer, that extend the set of elements available in the browser. This article introduces custom elements, and walks through some examples.

    There are two types of custom element:

    • Autonomous custom elements inherit from the HTML element base class HTMLElement. You have to implement their behavior from scratch.

    • Customized built-in elements inherit from standard HTML elements such as HTMLImageElement or HTMLParagraphElement. Their implementation extends the behavior of select instances of the standard element.

    interface BaseComponent<T> {
        _detector: ChangeDetectorRef;
        _model: ModelType<T>;
        _modelScope: ReactiveControlScope<T & Context>;
        _provider: InjectionProvider;
        _render: ComponentRender<any>;
        _signalScope: SignalScope;
        _viewScope: ReactiveScope<{ this: BaseComponent<T> }>;
        _zone: AuroraZone;
        adoptedCallback(): void;
        attributeChangedCallback(name: string, oldValue: any, newValue: any): void;
        connectedCallback(): void;
        connectedMoveCallback(): void;
        disconnectedCallback(): void;
        getComponentRef(): ComponentRef<T>;
        getInput(viewProp: string): PropertyRef | undefined;
        getInputValue(viewProp: string): any;
        onDestroy(callback: () => void): void;
        setInputValue(viewProp: string, value: any): void;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index
    _model: ModelType<T>
    _render: ComponentRender<any>
    _signalScope: SignalScope
    _viewScope: ReactiveScope<{ this: BaseComponent<T> }>
    _zone: AuroraZone