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/lynx-testing-environment/Function.initElementTree.md.
Lynx
  • English
  • lynx-testing-environment / initElementTree

    initElementTree()

    function initElementTree(): object

    Returns

    object

    animationMap

    animationMap: Map<string, object>;

    Internal

    root

    root: undefined | LynxElement;

    uniqueId2Element

    uniqueId2Element: Map<number, LynxElement>;

    __AddDataset()

    Parameters

    ParameterType
    eLynxElement
    keystring
    valuestring

    Returns

    void

    __AddEvent()

    Parameters

    ParameterType
    eLynxElement
    eventTypestring
    eventNamestring
    eventHandlerstring | Record<string, any>

    Returns

    void

    __AddInlineStyle()

    Parameters

    ParameterType
    eHTMLElement
    keynumber
    valuestring

    Returns

    void

    __AppendElement()

    Parameters

    ParameterType
    parentLynxElement
    childLynxElement

    Returns

    void

    __CreateElement()

    Parameters

    ParameterType
    tagstring
    parentComponentUniqueIdnumber

    Returns

    LynxElement

    __CreateImage()

    Parameters

    ParameterType
    parentComponentUniqueIdnumber

    Returns

    LynxElement

    __CreateList()

    Parameters

    ParameterType
    parentComponentUniqueIdnumber
    componentAtIndexany
    enqueueComponentany

    Returns

    LynxElement

    __CreatePage()

    Parameters

    ParameterType
    _tagstring
    parentComponentUniqueIdnumber

    Returns

    LynxElement

    __CreateRawText()

    Parameters

    ParameterType
    textstring

    Returns

    LynxElement

    __CreateScrollView()

    Parameters

    ParameterType
    parentComponentUniqueIdnumber

    Returns

    LynxElement

    __CreateText()

    Parameters

    ParameterType
    parentComponentUniqueIdnumber

    Returns

    LynxElement

    __CreateView()

    Parameters

    ParameterType
    parentComponentUniqueIdnumber

    Returns

    LynxElement

    __CreateWrapperElement()

    Parameters

    ParameterType
    parentComponentUniqueIdnumber

    Returns

    LynxElement

    __ElementAnimate()

    Parameters

    ParameterType
    elementLynxElement
    args[number, string, ...any[]]

    Returns

    void

    __FirstElement()

    Parameters

    ParameterType
    eLynxElement

    Returns

    LynxElement

    __FlushElementTree()

    Returns

    void

    __GetAttributeByName()

    Parameters

    ParameterType
    eleLynxElement
    namestring

    Returns

    null | string

    __GetDataset()

    Parameters

    ParameterType
    eLynxElement

    Returns

    DOMStringMap

    __GetElementByUniqueId()

    Parameters

    ParameterType
    uniqueIdnumber

    Returns

    undefined | LynxElement

    __GetElementUniqueID()

    Parameters

    ParameterType
    eLynxElement

    Returns

    number

    __GetEvent()

    Parameters

    ParameterType
    eLynxElement
    eventTypestring
    eventNamestring

    Returns

    undefined | object

    __GetPageElement()

    Returns

    undefined | LynxElement

    __GetTag()

    Parameters

    ParameterType
    eleLynxElement

    Returns

    string

    __InsertElementBefore()

    Parameters

    ParameterType
    parentLynxElement
    childLynxElement
    ref?LynxElement

    Returns

    void

    __QuerySelector()

    Parameters

    ParameterType
    eLynxElement
    cssSelectorstring
    _paramsobject

    Returns

    undefined | LynxElement

    __RemoveElement()

    Parameters

    ParameterType
    parentLynxElement
    childLynxElement

    Returns

    void

    __RemoveGestureDetector()

    Parameters

    ParameterType
    eLynxElement
    idnumber

    Returns

    void

    __ReplaceElement()

    Parameters

    ParameterType
    newElementLynxElement
    oldElementLynxElement

    Returns

    void

    __SetAttribute()

    Parameters

    ParameterType
    eLynxElement
    keystring
    valueany

    Returns

    void

    __SetClasses()

    Parameters

    ParameterType
    eLynxElement
    clsstring

    Returns

    void

    __SetCSSId()

    Parameters

    ParameterType
    eLynxElement | LynxElement[]
    idstring
    entryName?string

    Returns

    void

    __SetDataset()

    Parameters

    ParameterType
    eLynxElement
    datasetany

    Returns

    void

    __SetGestureDetector()

    Parameters

    ParameterType
    eLynxElement
    idnumber
    typenumber
    configany
    relationMapRecord<string, number[]>

    Returns

    void

    __SetID()

    Parameters

    ParameterType
    eLynxElement
    idstring

    Returns

    void

    __SetInlineStyles()

    Parameters

    ParameterType
    eLynxElement
    stylesstring | Record<string, string>

    Returns

    void

    __UpdateListCallbacks()

    Parameters

    ParameterType
    listLynxElement
    componentAtIndex(list: LynxElement, listID: number, cellIndex: number, operationID: number, enable_reuse_notification: boolean) => void
    enqueueComponent(list: LynxElement, listID: number, sign: number) => void

    Returns

    void

    __UpdateListComponents()

    Parameters

    ParameterType
    _listLynxElement
    _componentsstring[]

    Returns

    void

    clear()

    Returns

    void

    countElement()

    Parameters

    ParameterType
    elementLynxElement
    parentComponentUniqueIdnumber

    Returns

    void

    enterListItemAtIndex()

    Enter a list-item element at the given index. It will load the list-item element using the componentAtIndex callback.

    Parameters

    ParameterTypeDescription
    eLynxElementThe list element
    indexnumberThe index of the list-item element
    ...argsany[]The arguments used to create the list-item element

    Returns

    number

    The unique id of the list-item element

    leaveListItem()

    Leave a list-item element. It will mark the list-item element as unused using the enqueueComponent callback, and the list-item element will be reused in the future by other list-item elements.

    Parameters

    ParameterTypeDescription
    eLynxElementThe list element
    uiSignnumberThe unique id of the list-item element

    Returns

    void

    toJSON()

    Returns

    undefined | LynxElement

    toTree()

    Returns

    undefined | LynxElement

    Defined in

    lynx/ElementPAPI.d.ts:47

    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.