Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add experimental features for Fx 122: shadowrootmode, async clipboard #31612

Merged
merged 11 commits into from
Jan 15, 2024
40 changes: 40 additions & 0 deletions files/en-us/mozilla/firefox/experimental_features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,46 @@ HTML password input elements ([`<input type="password">`](/en-US/docs/Web/HTML/E
</tbody>
</table>

### Declarative shadow DOM

The {{htmlelement("template")}} element now supports a `shadowrootmode` attribute which can be set to either `open` or `closed`, the same values as the `mode` option of {{domxref("Element.attachShadow()", "attachShadow()")}} method. It allows the creation of a shadow DOM subtree declaratively. (See [Firefox bug 1712140](https://bugzil.la/1712140) for more details.)
pepelsbey marked this conversation as resolved.
Show resolved Hide resolved

<table>
<thead>
<tr>
<th>Release channel</th>
<th>Version added</th>
<th>Enabled by default?</th>
</tr>
</thead>
<tbody>
<tr>
<th>Nightly</th>
<td>122</td>
<td>Yes</td>
</tr>
<tr>
<th>Developer Edition</th>
<td>122</td>
<td>No</td>
</tr>
<tr>
<th>Beta</th>
<td>122</td>
<td>No</td>
</tr>
<tr>
<th>Release</th>
<td>122</td>
<td>No</td>
</tr>
<tr>
<th>Preference name</th>
<td colspan="2"><code>dom.webcomponents.shadowdom.declarative.enabled</code></td>
</tr>
</tbody>
</table>

## CSS

### Hex boxes to display stray control characters
Expand Down
12 changes: 12 additions & 0 deletions files/en-us/mozilla/firefox/releases/122/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ This article provides information about the changes in Firefox 122 that affect d

These features are newly shipped in Firefox 122 but are disabled by default. To experiment with them, search for the appropriate preference on the `about:config` page and set it to `true`. You can find more such features on the [Experimental features](/en-US/docs/Mozilla/Firefox/Experimental_features) page.

- Declarative shadow DOM: `dom.webcomponents.shadowdom.declarative.enabled`

The {{htmlelement("template")}} element now supports a `shadowrootmode` attribute which can be set to either `open` or `closed`, the same values as the `mode` option of {{domxref("Element.attachShadow()", "attachShadow()")}} method. It allows the creation of a shadow DOM subtree declaratively. ([Firefox bug 1712140](https://bugzil.la/1712140))
pepelsbey marked this conversation as resolved.
Show resolved Hide resolved

- Popover API: `dom.element.popover.enabled`

Displaying popovers on top of page content is now supported via HTML attributes or JavaScript API, including styling with the CSS [`:popover-open`](/en-US/docs/Web/CSS/:popover-open) pseudo-class and extended support for the [`::backdrop`](/en-US/docs/Web/CSS/::backdrop) pseudo-element. See the [Popover API](/en-US/docs/Web/API/Popover_API) reference for more details. ([Firefox bug 1823757](https://bugzil.la/1823757))

- Clipboard read and write: `dom.events.asyncClipboard.clipboardItem`, `dom.events.asyncClipboard.readText` and `dom.events.asyncClipboard.writeText`

The async {{domxref('Clipboard API')}} is now fully supported, including [`read()`](/en-US/docs/Web/API/Clipboard/read), [`readText()`](/en-US/docs/Web/API/Clipboard/readText), and [`write()`](/en-US/docs/Web/API/Clipboard/write) methods and the {{domxref('ClipboardItem')}} interface. A paste context menu will appear for the user to confirm when reading clipboard data not provided by the same-origin page. ([Firefox bug 1809106](https://bugzil.la/1809106))

## Older versions

{{Firefox_for_developers(121)}}