Skip to content

Commit 8d3e426

Browse files
committed
fix minor text and add ElementCollection
1 parent 81240e0 commit 8d3e426

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

docs/user-guide.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ The Standard Web APIs are massive and not always very user-friendly. `PyDom` is
922922
Python modue that exposes the power of the web with an easy and idiomatic Pythonic
923923
interface on top.
924924

925-
While the[FFI](#ffi) interface described above focuses on giving full access to
925+
While the [FFI](#ffi) interface described above focuses on giving full access to
926926
the entire Standard Web APIs, `pydom` focuses on providing a small, intuitive and yet
927927
powerful API that priotirizes common use cases fist. For this reason, it's first
928928
layer is simple and intuitive (but limited to the most common use cases), but `pydom`
@@ -1039,12 +1039,29 @@ new_p.style.visible = False
10391039

10401040
##### Other useful aspects of the Element API
10411041

1042-
`append`: method to append a new child to the element.
1043-
`children`: list of the children of the element.
1044-
`value`: allows to set the `value` attribute of an element.
1045-
`clone`: method that creates a clone of the element. NODE: The clone elements will not be
1042+
* `append`: method to append a new child to the element.
1043+
* `children`: list of the children of the element.
1044+
* `value`: allows to set the `value` attribute of an element.
1045+
* `clone`: method that creates a clone of the element. NODE: The clone elements will not be
10461046
attached to any element.
1047-
`show_me`: method to scroll the page to where the element is placed.
1047+
* `show_me`: method to scroll the page to where the element is placed.
1048+
1049+
1050+
#### ElementCollection
1051+
1052+
Element Collections represent a collection of elements typically returned from a query. For instance:
1053+
1054+
```python
1055+
paragraphs = pydom['p']
1056+
```
1057+
1058+
In the example above, `paragraphs` is an `ElementCollection` that maps to all `p` elements in the page.
1059+
1060+
1061+
1062+
##### Interacting with an ElementCollection
1063+
1064+
Interacting
10481065

10491066

10501067
## Workers

0 commit comments

Comments
 (0)