mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6870 from progre/feature/github-electron-url-capitalize
Electron: Url to URL
This commit is contained in:
@@ -57,9 +57,9 @@ app.on('ready', () => {
|
||||
mainWindow = new BrowserWindow({ width: 800, height: 600 });
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadUrl(`file://${__dirname}/index.html`);
|
||||
mainWindow.loadUrl('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer'});
|
||||
mainWindow.webContents.loadUrl('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer'});
|
||||
mainWindow.loadURL(`file://${__dirname}/index.html`);
|
||||
mainWindow.loadURL('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer'});
|
||||
mainWindow.webContents.loadURL('file://foo/bar', {userAgent: 'cool-agent', httpReferrer: 'greateRefferer'});
|
||||
|
||||
mainWindow.webContents.openDevTools();
|
||||
mainWindow.webContents.toggleDevTools();
|
||||
@@ -153,7 +153,7 @@ var onlineStatusWindow: GitHubElectron.BrowserWindow;
|
||||
|
||||
app.on('ready', () => {
|
||||
onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false });
|
||||
onlineStatusWindow.loadUrl(`file://${__dirname}/online-status.html`);
|
||||
onlineStatusWindow.loadURL(`file://${__dirname}/online-status.html`);
|
||||
});
|
||||
|
||||
ipc.on('online-status-changed', (event: any, status: any) => {
|
||||
@@ -169,7 +169,7 @@ app.on('ready', () => {
|
||||
height: 600,
|
||||
'title-bar-style': 'hidden-inset',
|
||||
});
|
||||
window.loadUrl('https://github.com');
|
||||
window.loadURL('https://github.com');
|
||||
});
|
||||
|
||||
// Supported Chrome command line switches
|
||||
@@ -183,7 +183,7 @@ app.commandLine.appendSwitch('vmodule', 'console=0');
|
||||
// auto-updater
|
||||
// https://github.com/atom/electron/blob/master/docs/api/auto-updater.md
|
||||
|
||||
AutoUpdater.setFeedUrl('http://mycompany.com/myapp/latest?version=' + app.getVersion());
|
||||
AutoUpdater.setFeedURL('http://mycompany.com/myapp/latest?version=' + app.getVersion());
|
||||
|
||||
// browser-window
|
||||
// https://github.com/atom/electron/blob/master/docs/api/browser-window.md
|
||||
@@ -193,7 +193,7 @@ win.on('closed', () => {
|
||||
win = null;
|
||||
});
|
||||
|
||||
win.loadUrl('https://github.com');
|
||||
win.loadURL('https://github.com');
|
||||
win.show();
|
||||
|
||||
// content-tracing
|
||||
@@ -450,7 +450,7 @@ console.log(Clipboard.readText('selection'));
|
||||
CrashReporter.start({
|
||||
productName: 'YourName',
|
||||
companyName: 'YourCompany',
|
||||
submitUrl: 'https://your-domain.com/url-to-submit',
|
||||
submitURL: 'https://your-domain.com/url-to-submit',
|
||||
autoSubmit: true
|
||||
});
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ ipc.send('asynchronous-message', 'ping');
|
||||
|
||||
var BrowserWindow: typeof GitHubElectron.BrowserWindow = remote.require('browser-window');
|
||||
var win = new BrowserWindow({ width: 800, height: 600 });
|
||||
win.loadUrl('https://github.com');
|
||||
win.loadURL('https://github.com');
|
||||
|
||||
remote.getCurrentWindow().on('close', () => {
|
||||
// blabla...
|
||||
@@ -66,7 +66,7 @@ console.log(Clipboard.readText('selection'));
|
||||
CrashReporter.start({
|
||||
productName: 'YourName',
|
||||
companyName: 'YourCompany',
|
||||
submitUrl: 'https://your-domain.com/url-to-submit',
|
||||
submitURL: 'https://your-domain.com/url-to-submit',
|
||||
autoSubmit: true
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ declare module GitHubElectron {
|
||||
* warnings. For example, https and data are secure schemes because they cannot be
|
||||
* corrupted by active network attackers.
|
||||
*/
|
||||
registerUrlSchemeAsSecure(scheme: string): void;
|
||||
registerURLSchemeAsSecure(scheme: string): void;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+10
-10
@@ -24,9 +24,9 @@ declare module GitHubElectron {
|
||||
*/
|
||||
static createFromBuffer(buffer: Buffer, scaleFactor?: number): NativeImage;
|
||||
/**
|
||||
* Creates a new NativeImage instance from dataUrl
|
||||
* Creates a new NativeImage instance from dataURL
|
||||
*/
|
||||
static createFromDataUrl(dataUrl: string): NativeImage;
|
||||
static createFromDataURL(dataURL: string): NativeImage;
|
||||
/**
|
||||
* @returns Buffer Contains the image's PNG encoded data.
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ declare module GitHubElectron {
|
||||
/**
|
||||
* @returns string The data URL of the image.
|
||||
*/
|
||||
toDataUrl(): string;
|
||||
toDataURL(): string;
|
||||
/**
|
||||
* @returns boolean Whether the image is empty.
|
||||
*/
|
||||
@@ -377,9 +377,9 @@ declare module GitHubElectron {
|
||||
landscape?: boolean;
|
||||
}, callback: (error: Error, data: Buffer) => void): void;
|
||||
/**
|
||||
* Same with webContents.loadUrl(url).
|
||||
* Same with webContents.loadURL(url).
|
||||
*/
|
||||
loadUrl(url: string, options?: {
|
||||
loadURL(url: string, options?: {
|
||||
httpReferrer?: string;
|
||||
userAgent?: string;
|
||||
}): void;
|
||||
@@ -520,14 +520,14 @@ declare module GitHubElectron {
|
||||
* Loads the url in the window.
|
||||
* @param url Must contain the protocol prefix (e.g., the http:// or file://).
|
||||
*/
|
||||
loadUrl(url: string, options?: {
|
||||
loadURL(url: string, options?: {
|
||||
httpReferrer?: string;
|
||||
userAgent?: string;
|
||||
}): void;
|
||||
/**
|
||||
* @returns The URL of current web page.
|
||||
*/
|
||||
getUrl(): string;
|
||||
getURL(): string;
|
||||
/**
|
||||
* @returns The title of web page.
|
||||
*/
|
||||
@@ -1116,9 +1116,9 @@ declare module GitHubElectron {
|
||||
* Set the url and initialize the auto updater.
|
||||
* The url cannot be changed once it is set.
|
||||
*/
|
||||
setFeedUrl(url: string): void;
|
||||
setFeedURL(url: string): void;
|
||||
/**
|
||||
* Ask the server whether there is an update, you have to call setFeedUrl
|
||||
* Ask the server whether there is an update, you have to call setFeedURL
|
||||
* before using this API
|
||||
*/
|
||||
checkForUpdates(): any;
|
||||
@@ -1313,7 +1313,7 @@ declare module GitHubElectron {
|
||||
* URL that crash reports would be sent to as POST.
|
||||
* Default: http://54.249.141.255:1127/post
|
||||
*/
|
||||
submitUrl?: string;
|
||||
submitURL?: string;
|
||||
/**
|
||||
* Send the crash report without user interaction.
|
||||
* Default: true.
|
||||
|
||||
Reference in New Issue
Block a user