Skip to content

Commit

Permalink
Documentation for Element::Matches (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paril authored Jan 18, 2024
1 parent 4be52f7 commit b865e66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions pages/cpp_manual/elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Supported methods have simply had their initial letter capitalised to match the
| `InsertBefore()` | Inserts the first node before the second, child, node in the DOM. The newly parented node must first be detached from its existing parent. | insertBefore()
| `QuerySelector()` | Retrieve the first descendant element matching the provided RCSS selector(s). | querySelector()
| `QuerySelectorAll()` | Retrieve a set of all descendant elements matching the provided RCSS selector(s). | querySelectorAll()
| `Matches()` | Check if the current element matches the given RCSS selector(s). | matches()
| `RemoveAttribute()` | Remove the named attribute from the current node. | removeAttribute()
| `RemoveChild()` | Removes a child node from the current element, returning it as a unique pointer. | removeChild()
| `RemoveEventListener()` | Removes an event listener from the element. | removeEventListener()
Expand Down
12 changes: 8 additions & 4 deletions pages/lua_manual/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,9 @@ The Element class has no constructor; it must be instantiated through a [Documen
| [HasChildNodes](#Element-HasChildNodes){: .lua-function }() | `boolean`{: .lua-type }<br> |
| [InsertBefore](#Element-InsertBefore){: .lua-function }(`ElementPtr`{: .lua-type } element, `Element`{: .lua-type } adjacent_element) | `nil, Element`{: .lua-type } |
| [IsClassSet](#Element-IsClassSet){: .lua-function }(`string`{: .lua-type } name) | `boolean`{: .lua-type }<br> |
| [QuerySelector](#Element-QuerySelector){: .lua-function }(`string`{: .lua-type } name) | `Element`{: .lua-type }<br> |
| [QuerySelectorAll](#Element-QuerySelectorAll){: .lua-function }(`string`{: .lua-type } name) | `table`{: .lua-type }<br> |
| [QuerySelector](#Element-QuerySelector){: .lua-function }(`string`{: .lua-type } selectors) | `Element`{: .lua-type }<br> |
| [QuerySelectorAll](#Element-QuerySelectorAll){: .lua-function }(`string`{: .lua-type } selectors) | `table`{: .lua-type }<br> |
| [Matches](#Element-Matches){: .lua-function }(`string`{: .lua-type } selectors) | `boolean`{: .lua-type }<br> |
| [RemoveAttribute](#Element-RemoveAttribute){: .lua-function }(`string`{: .lua-type } name) | `nil`{: .lua-type } |
| [RemoveChild](#Element-RemoveChild){: .lua-function }(`Element`{: .lua-type } element) | `boolean`{: .lua-type }<br> |
| [ReplaceChild](#Element-ReplaceChild){: .lua-function }(`ElementPtr`{: .lua-type } inserted_element, `Element`{: .lua-type } replaced_element) | `boolean`{: .lua-type }<br> |
Expand Down Expand Up @@ -686,12 +687,15 @@ The Element class has no constructor; it must be instantiated through a [Documen
<a href='#Element-IsClassSet' name='Element-IsClassSet'>IsClassSet</a>{: .lua-function }(`string`{: .lua-type } name) &rarr; `boolean`{: .lua-type }
: Returns true if the class name is set on the element, false if not.

<a href='#Element-QuerySelector' name='Element-QuerySelector'>QuerySelector</a>{: .lua-function }(`string`{: .lua-type } id) &rarr; `Element`{: .lua-type }
<a href='#Element-QuerySelector' name='Element-QuerySelector'>QuerySelector</a>{: .lua-function }(`string`{: .lua-type } selectors) &rarr; `Element`{: .lua-type }
: Returns the first descendant element matching the provided RCSS selector(s).

<a href='#Element-QuerySelectorAll' name='Element-QuerySelectorAll'>QuerySelectorAll</a>{: .lua-function }(`string`{: .lua-type } tag_name) &rarr; `table`{: .lua-type }
<a href='#Element-QuerySelectorAll' name='Element-QuerySelectorAll'>QuerySelectorAll</a>{: .lua-function }(`string`{: .lua-type } selectors) &rarr; `table`{: .lua-type }
: Returns a set of all descendant elements matching the provided RCSS selector(s). Returned table is indexable with integers.

<a href='#Element-Matches' name='Element-Matches'>Matches</a>{: .lua-function }(`string`{: .lua-type } selectors) &rarr; `boolean`{: .lua-type }
: Returns true if the element matches the provided RCSS selector(s), false if not.

<a href='#Element-RemoveAttribute' name='Element-RemoveAttribute'>RemoveAttribute</a>{: .lua-function }(`string`{: .lua-type } name) &rarr; `nil`{: .lua-type}
: Removes the attribute named name from the element.

Expand Down

0 comments on commit b865e66

Please sign in to comment.