Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

sourcegraph/event-positions

Repository files navigation

Event Positions

build codecov code style: prettier semantic-release

⚠️ Archived because it's unused ⚠️

This is a small library used to determining the the positions that events happened at in code views.

Installation

npm install @sourcegraph/event-positions

Usage

It is currently exposed as an RxJs Operator

import { findPositionsFromEvents } from 'event-positions'

observableOfDomElements
  .pipe(
    findPositionsFromEvents({
      ...props,
    })
  )
  .subscribe(positionEvent => console.log(positionEvent)) // { line: ..., character: ..., token: ... }

About

Gets the positions of clicks and hovers in DOM elements

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •