docs: update external links (#39421)
This commit is contained in:
parent
11600c5f96
commit
255064659f
30 changed files with 51 additions and 51 deletions
|
@ -22,7 +22,7 @@ session.defaultSession.cookies.get({})
|
|||
})
|
||||
|
||||
// Query all cookies associated with a specific url.
|
||||
session.defaultSession.cookies.get({ url: 'http://www.github.com' })
|
||||
session.defaultSession.cookies.get({ url: 'https://www.github.com' })
|
||||
.then((cookies) => {
|
||||
console.log(cookies)
|
||||
}).catch((error) => {
|
||||
|
@ -31,7 +31,7 @@ session.defaultSession.cookies.get({ url: 'http://www.github.com' })
|
|||
|
||||
// Set a cookie with the given cookie data;
|
||||
// may overwrite equivalent cookies if they exist.
|
||||
const cookie = { url: 'http://www.github.com', name: 'dummy_name', value: 'dummy' }
|
||||
const cookie = { url: 'https://www.github.com', name: 'dummy_name', value: 'dummy' }
|
||||
session.defaultSession.cookies.set(cookie)
|
||||
.then(() => {
|
||||
// success
|
||||
|
|
|
@ -13,7 +13,7 @@ property of [`WebContents`](web-contents.md), or from the `session` module.
|
|||
const { BrowserWindow } = require('electron')
|
||||
|
||||
const win = new BrowserWindow({ width: 800, height: 600 })
|
||||
win.loadURL('http://github.com')
|
||||
win.loadURL('https://github.com')
|
||||
|
||||
const ses = win.webContents.session
|
||||
console.log(ses.getUserAgent())
|
||||
|
|
|
@ -13,7 +13,7 @@ the [`BrowserWindow`](browser-window.md) object. An example of accessing the
|
|||
const { BrowserWindow } = require('electron')
|
||||
|
||||
const win = new BrowserWindow({ width: 800, height: 1500 })
|
||||
win.loadURL('http://github.com')
|
||||
win.loadURL('https://github.com')
|
||||
|
||||
const contents = win.webContents
|
||||
console.log(contents)
|
||||
|
@ -895,7 +895,7 @@ const win = new BrowserWindow({ webPreferences: { offscreen: true } })
|
|||
win.webContents.on('paint', (event, dirty, image) => {
|
||||
// updateBitmap(dirty, image.getBitmap())
|
||||
})
|
||||
win.loadURL('http://github.com')
|
||||
win.loadURL('https://github.com')
|
||||
```
|
||||
|
||||
#### Event: 'devtools-reload-page'
|
||||
|
@ -1071,7 +1071,7 @@ Returns `string` - The URL of the current web page.
|
|||
```javascript
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({ width: 800, height: 600 })
|
||||
win.loadURL('http://github.com').then(() => {
|
||||
win.loadURL('https://github.com').then(() => {
|
||||
const currentURL = win.webContents.getURL()
|
||||
console.log(currentURL)
|
||||
})
|
||||
|
@ -1651,7 +1651,7 @@ const path = require('path')
|
|||
const os = require('os')
|
||||
|
||||
const win = new BrowserWindow()
|
||||
win.loadURL('http://github.com')
|
||||
win.loadURL('https://github.com')
|
||||
|
||||
win.webContents.on('did-finish-load', () => {
|
||||
// Use default printing options
|
||||
|
|
|
@ -112,7 +112,7 @@ The `src` attribute can also accept data URLs, such as
|
|||
### `nodeintegration`
|
||||
|
||||
```html
|
||||
<webview src="http://www.google.com/" nodeintegration></webview>
|
||||
<webview src="https://www.google.com/" nodeintegration></webview>
|
||||
```
|
||||
|
||||
A `boolean`. When this attribute is present the guest page in `webview` will have node
|
||||
|
@ -123,7 +123,7 @@ page.
|
|||
### `nodeintegrationinsubframes`
|
||||
|
||||
```html
|
||||
<webview src="http://www.google.com/" nodeintegrationinsubframes></webview>
|
||||
<webview src="https://www.google.com/" nodeintegrationinsubframes></webview>
|
||||
```
|
||||
|
||||
A `boolean` for the experimental option for enabling NodeJS support in sub-frames such as iframes
|
||||
|
@ -161,7 +161,7 @@ after this script has finished executing.
|
|||
### `httpreferrer`
|
||||
|
||||
```html
|
||||
<webview src="https://www.github.com/" httpreferrer="http://cheng.guru"></webview>
|
||||
<webview src="https://www.github.com/" httpreferrer="https://example.com/"></webview>
|
||||
```
|
||||
|
||||
A `string` that sets the referrer URL for the guest page.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue