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
1 change: 1 addition & 0 deletions docs/For Developers/Contributors of Documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
* Cong Liu <cong.liu@intel.com>
* Oleg Aleynik <oleg.aleynik@gmail.com>
* Yang Fan <yangfan.23@qq.com>
* Rajesh Digambar Bagul <102693488+Rajesh270712@users.noreply.github.com>
23 changes: 23 additions & 0 deletions docs/References/webview Tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@ To embed a web page in your app, add the webview tag to your app's embedder page
<webview id="foo" src="http://www.google.com/" style="width:640px; height:480px"></webview>
```

For predictable sizing, give `<webview>` an explicit layout display and size. If a `<webview>` is expected to fill its window or parent container, make sure the parent has a defined size and style the `<webview>` with a flex-compatible display. Treat this as a CSS layout requirement for the embedder page, not as a runtime resize fix.

For example, a full-window `<webview>` can be styled like this:

```html
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
}

webview {
display: inline-flex;
width: 100%;
height: 100%;
}
</style>

<webview src="http://www.google.com/"></webview>
```

## References

See [Chrome document of `<webview>` tag](https://developer.chrome.com/docs/extensions/reference/webviewTag/) for detailed API references.
Expand Down