mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-18 20:37:14 +08:00
Merge pull request #4162 from jpevarnek/chrome-windows-getting
Add missing functions for chrome windows api
This commit is contained in:
@@ -23,8 +23,13 @@ chrome.app.runtime.onLaunched.addListener(function (launchData: runtime.LaunchDa
|
||||
|
||||
chrome.app.runtime.onRestarted.addListener(function () { return; });
|
||||
|
||||
// Get Current Window
|
||||
// retrieving windows
|
||||
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();
|
||||
|
||||
// check platform capabilities
|
||||
var visibleEverywhere: boolean = chrome.app.window.canSetVisibleOnAllWorkspaces();
|
||||
|
||||
// FileSystem
|
||||
// https://developer.chrome.com/apps/fileSystem
|
||||
|
||||
3
chrome/chrome-app.d.ts
vendored
3
chrome/chrome-app.d.ts
vendored
@@ -126,6 +126,9 @@ declare module chrome.app.window {
|
||||
|
||||
export function create(url: string, options?: CreateWindowOptions, callback?: (created_window: AppWindow) => void): void;
|
||||
export function current(): AppWindow;
|
||||
export function get(id: string): AppWindow;
|
||||
export function getAll(): AppWindow[];
|
||||
export function canSetVisibleOnAllWorkspaces(): boolean;
|
||||
|
||||
interface WindowEvent {
|
||||
addListener(callback: () => void): void;
|
||||
|
||||
Reference in New Issue
Block a user