Skip to content

Commit

Permalink
Update EMBEDDING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoXianNv-boot authored Aug 16, 2024
1 parent 303e5ab commit feb0c9c
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion docs/EMBEDDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ query string. Currently the following options are available:
it cannot fit in the browser.

* `resize` - How to resize the remote session if it is not the same size as
the browser window. Can be one of `off`, `browser`, `scale` and `remote`.
the browser window. Can be one of `off`, [`browser`](#resizebrowser), `scale` and `remote`.

* `quality` - The session JPEG quality level. Can be `0` to `9`.

Expand Down Expand Up @@ -103,3 +103,28 @@ Nginx:
# In the location block related to noVNC
add_header Cache-Control no-cache;
```

### resize:browser

For security reasons, it's no longer possible in Firefox for
a website to change the default size of a window in a browser
if the window wasn't created by , or contains more than one tab.
See the compatibility table for details on the change. window.open()

Even if you create window by it is not resizable by default.
To make the window resizable, you must open it with the feature.
window.open()"`resizable`"

```js
window.open('vnc.html/token=token&autoconnect=1&resize=browser','_blank','toolbar=no,location=no,status=no,menubar=no,resizable=yes,width=800,height=420');
```

#### Browser compatibility

| browser | version | resize:browser
| ------------ | ---- | -----------
| `Chrome` | 1 | `window.open(rul,,"_blank","resizable=yes")`
| `Edge` | 12 | `window.open(rul,,"_blank","resizable=yes")`
| `Firefox` | 1 | `window.open(rul,,"_blank","resizable=yes")`
| `Opera` | 12.1 | `window.open(rul,,"_blank","resizable=yes")`
| `Safari` | 1 | `window.open(rul,,"_blank","resizable=yes")`

0 comments on commit feb0c9c

Please sign in to comment.