Skip to content

Commit 10b578d

Browse files
committed
Format readme
1 parent a6d9a42 commit 10b578d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ This API is focused on providing an intuitive way to obtain the coordinates of t
5454
Behind the scenes, `InputRange` works by creating a 'clone' element that copies all of the styling and contents from the input element. This clone is then appended to the document and hidden from view so it can be queried. This low-level API is exposed as [`InputStyleClone`](https://iansan5653.github.io/dom-input-range/classes/InputStyleClone.html) for advanced use cases:
5555

5656
```ts
57-
const clone = new InputStyleClone(input)
58-
clone.element.getBoundingClientRect()
57+
const clone = new InputStyleClone(input);
58+
clone.element.getBoundingClientRect();
5959
```
6060

6161
Mounting a new element and copying styles can have a real performance impact, and this API has been carefully designed to minimize that. You can use `InputStyleClone.for` to share a single default clone instance for the lifetime of an input, **if you only plan to query and not mutate the clone element**:
6262

6363
```ts
64-
const sharedClone = InputStyleClone.for(input)
65-
clone.element.getBoundingClientRect()
64+
const sharedClone = InputStyleClone.for(input);
65+
clone.element.getBoundingClientRect();
6666
```

0 commit comments

Comments
 (0)