Skip to content

Commit 48bee9b

Browse files
authored
add hid feature policy to iframe (codesandbox#3871)
As per `https://wicg.github.io/webhid/#feature-policy` to use the Device HID APIs available behind a `chrome://flags` in Chrome. The sandbox iFrame needs to allow `hid`
1 parent 458390e commit 48bee9b

File tree

1 file changed

+1
-1
lines changed
  • packages/common/src/components/Preview

1 file changed

+1
-1
lines changed

packages/common/src/components/Preview/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ class BasePreview extends React.Component<Props, State> {
596596
<>
597597
<StyledFrame
598598
sandbox="allow-forms allow-scripts allow-same-origin allow-modals allow-popups allow-presentation"
599-
allow="geolocation; microphone; camera;midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
599+
allow="geolocation; microphone; camera;midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb; hid"
600600
src={this.state.url}
601601
ref={this.setIframeElement}
602602
title={getSandboxName(sandbox)}

0 commit comments

Comments
 (0)