File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,37 @@ declare module chrome.alarms {
43
43
var onAlarm : AlarmEvent ;
44
44
}
45
45
46
+ /**
47
+ * Use the chrome.browser API to interact with the Chrome browser associated with
48
+ * the current application and Chrome profile.
49
+ */
50
+ declare module chrome . browser {
51
+ interface Options {
52
+ /**
53
+ * The URL to navigate to when the new tab is initially opened.
54
+ */
55
+ url :string ;
56
+ }
57
+
58
+ /**
59
+ * Opens a new tab in a browser window associated with the current application
60
+ * and Chrome profile. If no browser window for the Chrome profile is opened,
61
+ * a new one is opened prior to creating the new tab.
62
+ * @param options Configures how the tab should be opened.
63
+ * @param callback Called when the tab was successfully
64
+ * created, or failed to be created. If failed, runtime.lastError will be set.
65
+ */
66
+ export function openTab ( options : Options , callback : ( ) => void ) : void ;
67
+
68
+ /**
69
+ * Opens a new tab in a browser window associated with the current application
70
+ * and Chrome profile. If no browser window for the Chrome profile is opened,
71
+ * a new one is opened prior to creating the new tab. Since Chrome 42 only.
72
+ * @param options Configures how the tab should be opened.
73
+ */
74
+ export function openTab ( options : Options ) : void ;
75
+ }
76
+
46
77
////////////////////
47
78
// Bookmarks
48
79
////////////////////
You can’t perform that action at this time.
0 commit comments