Removed webrtcippolicy attribute from webview
This commit is contained in:
parent
1c2a78a896
commit
950e3436c2
4 changed files with 1 additions and 20 deletions
|
@ -289,13 +289,6 @@ win.on('resize', () => {
|
|||
})
|
||||
```
|
||||
|
||||
### `webrtcippolicy`
|
||||
|
||||
```html
|
||||
<webview src="https://browserleaks.com/webrtc" webrtcippolicy="disable_non_proxied_udp"></webview>
|
||||
```
|
||||
This attribute allows you to set the WebRTC IP handling policy which controls what IPs are exposed via WebRTC. See [webContents](web-contents.md#contentssetwebrtciphandlingpolicypolicy) for available policies.
|
||||
|
||||
## Methods
|
||||
|
||||
The `webview` tag has the following methods:
|
||||
|
@ -319,7 +312,7 @@ webview.addEventListener('dom-ready', () => {
|
|||
* `userAgent` String (optional) - A user agent originating the request.
|
||||
* `extraHeaders` String (optional) - Extra headers separated by "\n"
|
||||
* `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[] - (optional)
|
||||
* `baseURLForDataURL` String (optional) - Base url (with trailing path separator) for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files.
|
||||
* `baseURLForDataURL` String (optional) - Base url (with trailing path separator) for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files.
|
||||
|
||||
Loads the `url` in the webview, the `url` must contain the protocol prefix,
|
||||
e.g. the `http://` or `file://`.
|
||||
|
|
|
@ -103,9 +103,6 @@ const createGuest = function (embedder, params) {
|
|||
height: params.maxheight
|
||||
}
|
||||
})
|
||||
if (params.webrtcippolicy) {
|
||||
guest.setWebRTCIPHandlingPolicy(params.webrtcippolicy)
|
||||
}
|
||||
if (params.src) {
|
||||
const opts = {}
|
||||
if (params.httpreferrer) {
|
||||
|
|
|
@ -304,13 +304,6 @@ class DisableBlinkFeaturesAttribute extends WebViewAttribute {
|
|||
}
|
||||
}
|
||||
|
||||
// Attribute specifies WebRTC IP handling policy for handling IP leaking.
|
||||
class WebRTCIPHandlingPolicyAttribute extends WebViewAttribute {
|
||||
constructor (webViewImpl) {
|
||||
super(webViewConstants.ATTRIBUTE_WEBRTCIPPOLICY, webViewImpl)
|
||||
}
|
||||
}
|
||||
|
||||
// Attribute that specifies the web preferences to be enabled.
|
||||
class WebPreferencesAttribute extends WebViewAttribute {
|
||||
constructor (webViewImpl) {
|
||||
|
@ -336,7 +329,6 @@ WebViewImpl.prototype.setupWebViewAttributes = function () {
|
|||
this.attributes[webViewConstants.ATTRIBUTE_GUESTINSTANCE] = new GuestInstanceAttribute(this)
|
||||
this.attributes[webViewConstants.ATTRIBUTE_DISABLEGUESTRESIZE] = new BooleanAttribute(webViewConstants.ATTRIBUTE_DISABLEGUESTRESIZE, this)
|
||||
this.attributes[webViewConstants.ATTRIBUTE_WEBPREFERENCES] = new WebPreferencesAttribute(this)
|
||||
this.attributes[webViewConstants.ATTRIBUTE_WEBRTCIPPOLICY] = new WebRTCIPHandlingPolicyAttribute(this)
|
||||
|
||||
const autosizeAttributes = [webViewConstants.ATTRIBUTE_MAXHEIGHT, webViewConstants.ATTRIBUTE_MAXWIDTH, webViewConstants.ATTRIBUTE_MINHEIGHT, webViewConstants.ATTRIBUTE_MINWIDTH]
|
||||
autosizeAttributes.forEach((attribute) => {
|
||||
|
|
|
@ -20,7 +20,6 @@ module.exports = {
|
|||
ATTRIBUTE_GUESTINSTANCE: 'guestinstance',
|
||||
ATTRIBUTE_DISABLEGUESTRESIZE: 'disableguestresize',
|
||||
ATTRIBUTE_WEBPREFERENCES: 'webpreferences',
|
||||
ATTRIBUTE_WEBRTCIPPOLICY: 'webrtcippolicy',
|
||||
|
||||
// Internal attribute.
|
||||
ATTRIBUTE_INTERNALINSTANCEID: 'internalinstanceid',
|
||||
|
|
Loading…
Reference in a new issue