UNPKG

@haiku/player

Version:

Haiku Player is a JavaScript library for building user interfaces

22 lines 785 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function addElementToHashTable(hash, realElement, virtualElement) { if (virtualElement && virtualElement.attributes) { var flexId = virtualElement.attributes['haiku-id'] || virtualElement.attributes.id; if (!hash[flexId]) { hash[flexId] = []; } var alreadyInList = false; for (var i = 0; i < hash[flexId].length; i++) { var elInList = hash[flexId][i]; if (elInList === realElement) { alreadyInList = true; } } if (!alreadyInList) { hash[flexId].push(realElement); } } } exports.default = addElementToHashTable; //# sourceMappingURL=addElementToHashTable.js.map