Skip to content

Type Editor


Type Editor / @type-editor/viewdesc / ViewDescUtil / ViewDescUtil

Class: ViewDescUtil

Defined in: ViewDescUtil.ts:8

Constructors

Constructor

ts
new ViewDescUtil(): ViewDescUtil;

Returns

ViewDescUtil

Methods

nearestNodeViewDesc()

ts
static nearestNodeViewDesc(viewDesc, dom): NodeViewDesc;

Defined in: ViewDescUtil.ts:28

Scan up the DOM tree to find the first node view description that is a descendant of this one.

Parameters

ParameterTypeDescription
viewDescPmViewDesc-
domNodeThe DOM node to start from

Returns

NodeViewDesc

The nearest node view description, or undefined if none found


nearestViewDesc()

ts
static nearestViewDesc(viewDesc, dom): ViewDesc;

Defined in: ViewDescUtil.ts:17

Scan up the DOM tree to find the first view description that is a descendant of this one.

Parameters

ParameterTypeDescription
viewDescPmViewDesc-
domNodeThe DOM node to start from

Returns

ViewDesc

The nearest view description, or undefined if none found