Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/iframe/iframe.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ describe("iframe util", () => {
});
});

it("returns an iframe with the allow attribute set to clipboard-read and clipboard-write", () => {
it("returns an iframe with the allow attribute set to clipboard-read, clipboard-write, and local-network-access", () => {
return import("./iframe").then(({ createIframe }) => {
const iframe = createIframe(mockSrc) as HTMLIFrameElement;
expect(iframe.allow).toEqual("clipboard-write");
expect(iframe.allow).toContain("clipboard-write");
expect(iframe.allow).toContain("local-network-access");
});
});
});
3 changes: 2 additions & 1 deletion src/iframe/iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const createIframe = (src: string): HTMLElement => {
iframe.style.setProperty("width", "100%");
iframe.style.setProperty("height", "100%");
iframe.style.setProperty("border", "none");
iframe.allow = "clipboard-write";
iframe.allow = "clipboard-write; local-network-access";

iframe.src = src;

return wrapWithLoader(iframe);
Expand Down
Loading