Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
brotheroftux committed Aug 16, 2024
1 parent e191102 commit c9423ef
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,19 @@ After html text

## Isolated IFrame (with script execution capabilities)

Please note that you have to provide the `isolatedSandboxHost` plugin option, which should specify a **cross-origin** URL where the `iframe-runtime.html` is hosted.
Make sure to set the `embeddingMode` plugin option to `isolated`.

::: html [isolated]
Please note that you also have to provide the `isolatedSandboxHost` plugin option, which should specify a **cross-origin** URL where the `iframe-runtime.html` is hosted.

To test this locally, run the following:

```bash
npx http-server ./iframe -p 5005 -c-1
```

Set the `isolatedSandboxHost` plugin option to `http://localhost:5005/iframe-runtime.html`. You could then run this example as you would normally do (again, make sure to set `embeddingMode` to `isolated`!)

::: html
We're counting. <span id="counter">0</span>

<script>
Expand Down

0 comments on commit c9423ef

Please sign in to comment.