For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/engine/element-api/__CreateComponent.md.
Lynx
  • English
  • __CreateComponent

    Introduction

    Creates a ComponentElement object.

    Syntax

    __CreateComponent(componentParentUniqueID: number, componentID: string, cssID: Number, entryName: string, name: string, path: string, config: Record<string, any>|null|undefined, info: Record<string, any>|null|undefined): Element;

    Parameters

    KeyDescription
    parentComponentUniqueIDThe Unique Component ID of the ComponentElement that creates this Element, which is a number.
    componentIDThe componentID set by the frontend framework for the ComponentElement, which is a case-sensitive string.
    cssIDThe CSSFragment ID, which is of type number.
    entryNameThe schema information of the Lazy Bundle where the current ComponentElement is located, which is a case-sensitive string.
    nameThe frontend-defined name of the current ComponentElement, which is a case-sensitive string.
    pathThe frontend path of the current ComponentElement, which is a case-sensitive string.
    configThe configuration for the current ComponentElement.
    infoSome additional information required when creating the ComponentElement; this parameter can be omitted.

    Return Value

    Returns the ComponentElement.

    Example

    The frontend framework can create a ComponentElement in the following way.

    // main-thread.js
    let element = __CreateComponent(0, '1', 1, '', 'name', 'path', {}, {});
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.