add firefox extension template
This commit is contained in:
6
externs/webextension_polyfill/search/Disposition.hx
Normal file
6
externs/webextension_polyfill/search/Disposition.hx
Normal file
@@ -0,0 +1,6 @@
|
||||
package webextension_polyfill.search;
|
||||
|
||||
/**
|
||||
Location where search results should be displayed.
|
||||
**/
|
||||
typedef Disposition = String;
|
20
externs/webextension_polyfill/search/QueryQueryInfoType.hx
Normal file
20
externs/webextension_polyfill/search/QueryQueryInfoType.hx
Normal file
@@ -0,0 +1,20 @@
|
||||
package webextension_polyfill.search;
|
||||
|
||||
typedef QueryQueryInfoType = {
|
||||
/**
|
||||
String to query with the default search provider.
|
||||
**/
|
||||
var text : String;
|
||||
/**
|
||||
Location where search results should be displayed. CURRENT_TAB is the default.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var disposition : Disposition;
|
||||
/**
|
||||
Location where search results should be displayed. tabId cannot be used with disposition.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var tabId : Float;
|
||||
};
|
19
externs/webextension_polyfill/search/SearchEngine.hx
Normal file
19
externs/webextension_polyfill/search/SearchEngine.hx
Normal file
@@ -0,0 +1,19 @@
|
||||
package webextension_polyfill.search;
|
||||
|
||||
/**
|
||||
An object encapsulating a search engine
|
||||
**/
|
||||
typedef SearchEngine = {
|
||||
var name : String;
|
||||
var isDefault : Bool;
|
||||
/**
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var alias : String;
|
||||
/**
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var favIconUrl : String;
|
||||
};
|
@@ -0,0 +1,27 @@
|
||||
package webextension_polyfill.search;
|
||||
|
||||
typedef SearchSearchPropertiesType = {
|
||||
/**
|
||||
Terms to search for.
|
||||
**/
|
||||
var query : String;
|
||||
/**
|
||||
Search engine to use. Uses the default if not specified.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var engine : String;
|
||||
/**
|
||||
Location where search results should be displayed. NEW_TAB is the default.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var disposition : Disposition;
|
||||
/**
|
||||
The ID of the tab for the search results. If not specified, a new tab is created, unless disposition is set.
|
||||
tabId cannot be used with disposition.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var tabId : Float;
|
||||
};
|
16
externs/webextension_polyfill/search/Static.hx
Normal file
16
externs/webextension_polyfill/search/Static.hx
Normal file
@@ -0,0 +1,16 @@
|
||||
package webextension_polyfill.search;
|
||||
|
||||
typedef Static = {
|
||||
/**
|
||||
Gets a list of search engines.
|
||||
**/
|
||||
function get():js.lib.Promise<Array<SearchEngine>>;
|
||||
/**
|
||||
Perform a search.
|
||||
**/
|
||||
function search(searchProperties:SearchSearchPropertiesType):Void;
|
||||
/**
|
||||
Use the chrome.search API to search via the default provider.
|
||||
**/
|
||||
function query(queryInfo:QueryQueryInfoType):js.lib.Promise<ts.Undefined>;
|
||||
};
|
Reference in New Issue
Block a user