mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Added missing AppWindow events.
This commit is contained in:
@@ -28,6 +28,14 @@ var currentWindow: cwindow.AppWindow = chrome.app.window.current();
|
||||
var otherWindow: cwindow.AppWindow = chrome.app.window.get('some-string');
|
||||
var allWindows: cwindow.AppWindow[] = chrome.app.window.getAll();
|
||||
|
||||
// listening to window events
|
||||
currentWindow.onBoundsChanged.addListener(function () { return; });
|
||||
currentWindow.onClosed.addListener(function () { return; });
|
||||
currentWindow.onFullscreened.addListener(function () { return; });
|
||||
currentWindow.onMaximized.addListener(function () { return; });
|
||||
currentWindow.onMinimized.addListener(function () { return; });
|
||||
currentWindow.onRestored.addListener(function () { return; });
|
||||
|
||||
// check platform capabilities
|
||||
var visibleEverywhere: boolean = chrome.app.window.canSetVisibleOnAllWorkspaces();
|
||||
|
||||
|
||||
6
chrome/chrome-app.d.ts
vendored
6
chrome/chrome-app.d.ts
vendored
@@ -122,6 +122,12 @@ declare module chrome.app.window {
|
||||
id: string;
|
||||
innerBounds: Bounds;
|
||||
outerBounds: Bounds;
|
||||
onBoundsChanged: WindowEvent;
|
||||
onClosed: WindowEvent;
|
||||
onFullscreened: WindowEvent;
|
||||
onMaximized: WindowEvent;
|
||||
onMinimized: WindowEvent;
|
||||
onRestored: WindowEvent;
|
||||
}
|
||||
|
||||
export function create(url: string, options?: CreateWindowOptions, callback?: (created_window: AppWindow) => void): void;
|
||||
|
||||
Reference in New Issue
Block a user