-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchrome-apps.js
45 lines (43 loc) · 1.74 KB
/
chrome-apps.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
return mod(require("tern/lib/infer"), require("tern/lib/tern"));
if (typeof define == "function" && define.amd) // AMD
return define([ "tern/lib/infer", "tern/lib/tern" ], mod);
mod(tern, tern);
})(function(infer, tern) {
"use strict";
tern.registerPlugin("chrome-apps", function(server, options) {
server._chromeApps = {};
return { defs : defs };
});
var defs = {
"!name": "chrome-apps",
"CreateWindowOptions": {
"!url": "https://developer.chrome.com/apps/app_window#type-CreateWindowOptions",
"id": {
"!doc": "Id to identify the window. This will be used to remember the size and position of the window and restore that geometry when a window with the same id is later opened. If a window with a given id is created while another window with the same id already exists, the currently opened window will be focused instead of creating a new window.",
"!type": "string"
},
"hidden": {
"!doc": "If true, the window will be created in a hidden state. Call show() on the window to show it once it has been created. Defaults to false.",
"!type": "bool"
}
},
"chrome": {
"!doc": "global variable",
"app": {
"runtime": {
"onLaunched": {
"addListener": "fn() -> ()"
}
},
"window": {
"create": {
"!type": "fn(url: string, options: +CreateWindowOptions, callback: fn())",
"!url": "https://developer.chrome.com/apps/app_window#method-create"
}
}
}
}
}
})