Skip to content

Commit

Permalink
docs: fix container.atPosition() API (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed May 20, 2022
1 parent 91a0147 commit c3db2ff
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,18 @@ Arguments:

### `container.atPosition(line, column)`

Returns the node at the source position `index`.
Returns the node at the source position `line` and `column`.

```js
selector.at(0) === selector.first;
selector.at(0) === selector.nodes[0];
// Input: :not(.foo),\n#foo > :matches(ol, ul)
selector.atPosition(1, 1); // => :not(.foo)
selector.atPosition(2, 1); // => \n#foo
```

Arguments:

* `index`: The index of the node to return.
* `line`: The line number of the node to return.
* `column`: The column number of the node to return.

### `container.index(node)`

Expand Down

0 comments on commit c3db2ff

Please sign in to comment.