__ElementIsEqual

Introduction

Determines if the two passed Element objects are the same Element.

Syntax

__ElementIsEqual(left: Element, right: Element) : bool;

Parameters

Key Description
left The left node to be compared.
right The right node to be compared.

Return Value

Returns true only when the left and right are the same node.

Example

The frontend framework can perform the comparison operation as follows.

// main-thread.js
let childA = __CreateElement('view', 0, {});

let childB = __CreateElement('view', 0, {});

let isEqual = __ElementIsEqual(childA, childB);
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.