Skip to content

Commit

Permalink
FF121 ExperFeat: Custom element pseudo class (mdn#30394)
Browse files Browse the repository at this point in the history
* FF121 ExperFeat: Custom element pseudo class

* Update files/en-us/mozilla/firefox/experimental_features/index.md

Co-authored-by: Zach Fox <[email protected]>

* Update files/en-us/mozilla/firefox/experimental_features/index.md

Co-authored-by: Zach Fox <[email protected]>

---------

Co-authored-by: Zach Fox <[email protected]>
  • Loading branch information
hamishwillee and zfox23 authored Nov 21, 2023
1 parent 1b5be36 commit 98b2e45
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions files/en-us/mozilla/firefox/experimental_features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1950,16 +1950,10 @@ The `GeometryUtils` method `getBoxQuads()` returns the CSS boxes for a {{domxref
</tbody>
</table>

#### ElementInternals: Form associated custom element methods and properties
#### Custom element state pseudo-class

New {{domxref("ElementInternals")}} properties and methods that allow custom elements to interact with a form:

- The {{domxref("ElementInternals.form","form")}} property gets the form associated with the element.
- The {{domxref("ElementInternals.labels","labels")}} property gets the list of labels associated with the element.
- The {{domxref("ElementInternals.willValidate", "willValidate")}} property checks if a custom form element will be validated.
- The {{domxref("ElementInternals.setFormValue()","setFormValue()")}} method sets the sanitized value and user-entered data, if needed.

See these bugs for details: [Firefox bug 1556362](https://bugzil.la/1556362), [Firefox bug 1556373](https://bugzil.la/1556373), [Firefox bug 1556365](https://bugzil.la/1556365), [Firefox bug 1556449](https://bugzil.la/1556449).
Custom elements can expose their internal state via the {{domxref("ElementInternals.states","states")}} property as a {{domxref("CustomStateSet")}}. A CSS custom state pseudo-class such as `:--somestate` can match that element's state.
(See [Firefox bug 1861466](https://bugzil.la/1861466) for more details.)

<table>
<thead>
Expand All @@ -1972,27 +1966,27 @@ See these bugs for details: [Firefox bug 1556362](https://bugzil.la/1556362), [F
<tbody>
<tr>
<th>Nightly</th>
<td>95</td>
<td>Yes</td>
<td>121</td>
<td>No</td>
</tr>
<tr>
<th>Developer Edition</th>
<td>95</td>
<td>121</td>
<td>No</td>
</tr>
<tr>
<th>Beta</th>
<td>95</td>
<td>121</td>
<td>No</td>
</tr>
<tr>
<th>Release</th>
<td>95</td>
<td>121</td>
<td>No</td>
</tr>
<tr>
<th>Preference name</th>
<td colspan="2"><code>dom.webcomponents.formAssociatedCustomElement.enabled</code></td>
<td colspan="2"><code>dom.element.customstateset.enabled</code></td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 98b2e45

Please sign in to comment.