UNPKG

playwright-fluent

Version:
18 lines (17 loc) 648 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPreviousSiblingsOf = void 0; async function getPreviousSiblingsOf(handles) { const result = []; for (let index = 0; index < handles.length; index++) { const element = handles[index]; const jsHandle = await element.evaluateHandle((node) => node.previousElementSibling); const previousSiblingElement = jsHandle.asElement(); if (previousSiblingElement === null) { continue; } result.push(previousSiblingElement); } return result; } exports.getPreviousSiblingsOf = getPreviousSiblingsOf;