compute-xpath
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

xPath

publish BSD-3-Clause License npm npm dependents npm downloads

This is a library that generates xPath based on DOM elements. The implementation is extracted from Chrome DevTools Frontend

Introduction

You can generate xPath based on DOM elements. For example:

import { computeXPath } from 'compute-xpath';

const xPath = computeXPath(element)[0];

Parameters

  • node: The node to compute
  • optimized: Whether to optimize the XPath for the node. Does not imply the XPath is shorter; implies the XPath will be highly-scoped to the node.

License

BSD-3-Clause

Readme

Keywords

Package Sidebar

Install

npm i compute-xpath

Weekly Downloads

2

Version

1.0.0

License

BSD-3-Clause

Unpacked Size

10.2 kB

Total Files

9

Last publish

Collaborators

  • crazyurus