add firefox extension template
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package webextension_polyfill.networkstatus;
|
||||
|
||||
typedef NetworkLinkInfo = {
|
||||
/**
|
||||
Status of the network link, if "unknown" then link is usually assumed to be "up"
|
||||
**/
|
||||
var status : NetworkLinkInfoStatusEnum;
|
||||
/**
|
||||
If known, the type of network connection that is avialable.
|
||||
**/
|
||||
var type : NetworkLinkInfoTypeEnum;
|
||||
/**
|
||||
If known, the network id or name.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var id : String;
|
||||
};
|
@@ -0,0 +1,6 @@
|
||||
package webextension_polyfill.networkstatus;
|
||||
|
||||
/**
|
||||
Status of the network link, if "unknown" then link is usually assumed to be "up"
|
||||
**/
|
||||
typedef NetworkLinkInfoStatusEnum = String;
|
@@ -0,0 +1,6 @@
|
||||
package webextension_polyfill.networkstatus;
|
||||
|
||||
/**
|
||||
If known, the type of network connection that is avialable.
|
||||
**/
|
||||
typedef NetworkLinkInfoTypeEnum = String;
|
12
externs/webextension_polyfill/networkstatus/Static.hx
Normal file
12
externs/webextension_polyfill/networkstatus/Static.hx
Normal file
@@ -0,0 +1,12 @@
|
||||
package webextension_polyfill.networkstatus;
|
||||
|
||||
typedef Static = {
|
||||
/**
|
||||
Returns the $(ref:NetworkLinkInfo} of the current network connection.
|
||||
**/
|
||||
function getLinkInfo():Void;
|
||||
/**
|
||||
Fired when the network connection state changes.
|
||||
**/
|
||||
var onConnectionChanged : webextension_polyfill.events.Event<(details:NetworkLinkInfo) -> Void>;
|
||||
};
|
Reference in New Issue
Block a user