add missing externs to repo
This commit is contained in:
13
externs/webextension_polyfill/sessions/Device.hx
Normal file
13
externs/webextension_polyfill/sessions/Device.hx
Normal file
@@ -0,0 +1,13 @@
|
||||
package webextension_polyfill.sessions;
|
||||
|
||||
typedef Device = {
|
||||
var info : String;
|
||||
/**
|
||||
The name of the foreign device.
|
||||
**/
|
||||
var deviceName : String;
|
||||
/**
|
||||
A list of open window sessions for the foreign device, sorted from most recently to least recently modified session.
|
||||
**/
|
||||
var sessions : Array<Session>;
|
||||
};
|
11
externs/webextension_polyfill/sessions/Filter.hx
Normal file
11
externs/webextension_polyfill/sessions/Filter.hx
Normal file
@@ -0,0 +1,11 @@
|
||||
package webextension_polyfill.sessions;
|
||||
|
||||
typedef Filter = {
|
||||
/**
|
||||
The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of
|
||||
entries ($(ref:sessions.MAX_SESSION_RESULTS)).
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var maxResults : Float;
|
||||
};
|
20
externs/webextension_polyfill/sessions/Session.hx
Normal file
20
externs/webextension_polyfill/sessions/Session.hx
Normal file
@@ -0,0 +1,20 @@
|
||||
package webextension_polyfill.sessions;
|
||||
|
||||
typedef Session = {
|
||||
/**
|
||||
The time when the window or tab was closed or modified, represented in milliseconds since the epoch.
|
||||
**/
|
||||
var lastModified : Float;
|
||||
/**
|
||||
The $(ref:tabs.Tab), if this entry describes a tab. Either this or $(ref:sessions.Session.window) will be set.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var tab : webextension_polyfill.tabs.Tab;
|
||||
/**
|
||||
The $(ref:windows.Window), if this entry describes a window. Either this or $(ref:sessions.Session.tab) will be set.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var window : webextension_polyfill.windows.Window;
|
||||
};
|
52
externs/webextension_polyfill/sessions/Static.hx
Normal file
52
externs/webextension_polyfill/sessions/Static.hx
Normal file
@@ -0,0 +1,52 @@
|
||||
package webextension_polyfill.sessions;
|
||||
|
||||
typedef Static = {
|
||||
/**
|
||||
Forget a recently closed tab.
|
||||
**/
|
||||
function forgetClosedTab(windowId:Float, sessionId:String):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Forget a recently closed window.
|
||||
**/
|
||||
function forgetClosedWindow(sessionId:String):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Gets the list of recently closed tabs and/or windows.
|
||||
**/
|
||||
function getRecentlyClosed(?filter:Filter):js.lib.Promise<Array<Session>>;
|
||||
/**
|
||||
Reopens a $(ref:windows.Window) or $(ref:tabs.Tab), with an optional callback to run when the entry has been restored.
|
||||
**/
|
||||
function restore(?sessionId:String):js.lib.Promise<Session>;
|
||||
/**
|
||||
Set a key/value pair on a given tab.
|
||||
**/
|
||||
function setTabValue(tabId:Float, key:String, value:Dynamic):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Retrieve a value that was set for a given key on a given tab.
|
||||
**/
|
||||
function getTabValue(tabId:Float, key:String):js.lib.Promise<Dynamic>;
|
||||
/**
|
||||
Remove a key/value pair that was set on a given tab.
|
||||
**/
|
||||
function removeTabValue(tabId:Float, key:String):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Set a key/value pair on a given window.
|
||||
**/
|
||||
function setWindowValue(windowId:Float, key:String, value:Dynamic):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Retrieve a value that was set for a given key on a given window.
|
||||
**/
|
||||
function getWindowValue(windowId:Float, key:String):js.lib.Promise<Dynamic>;
|
||||
/**
|
||||
Remove a key/value pair that was set on a given window.
|
||||
**/
|
||||
function removeWindowValue(windowId:Float, key:String):js.lib.Promise<ts.Undefined>;
|
||||
/**
|
||||
Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes.
|
||||
**/
|
||||
var onChanged : webextension_polyfill.events.Event<() -> Void>;
|
||||
/**
|
||||
The maximum number of $(ref:sessions.Session) that will be included in a requested list.
|
||||
**/
|
||||
var MAX_SESSION_RESULTS : Int;
|
||||
};
|
Reference in New Issue
Block a user