add firefox extension template
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package webextension_polyfill.activitylog;
|
||||
|
||||
typedef OnExtensionActivityDetailsType = {
|
||||
/**
|
||||
The date string when this call is triggered.
|
||||
**/
|
||||
var timeStamp : webextension_polyfill.extensiontypes.DateType;
|
||||
/**
|
||||
The type of log entry. api_call is a function call made by the extension and api_event is an event callback to the
|
||||
extension. content_script is logged when a content script is injected.
|
||||
**/
|
||||
var type : OnExtensionActivityDetailsTypeTypeEnum;
|
||||
/**
|
||||
The type of view where the activity occurred. Content scripts will not have a viewType.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var viewType : OnExtensionActivityDetailsTypeViewTypeEnum;
|
||||
/**
|
||||
The name of the api call or event, or the script url if this is a content or user script event.
|
||||
**/
|
||||
var name : String;
|
||||
var data : OnExtensionActivityDetailsTypeDataType;
|
||||
};
|
@@ -0,0 +1,6 @@
|
||||
package webextension_polyfill.activitylog;
|
||||
|
||||
/**
|
||||
The result of the call.
|
||||
**/
|
||||
typedef OnExtensionActivityDetailsTypeDataResultType = { };
|
@@ -0,0 +1,28 @@
|
||||
package webextension_polyfill.activitylog;
|
||||
|
||||
typedef OnExtensionActivityDetailsTypeDataType = {
|
||||
/**
|
||||
A list of arguments passed to the call.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var args : Array<Dynamic>;
|
||||
/**
|
||||
The result of the call.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var result : OnExtensionActivityDetailsTypeDataResultType;
|
||||
/**
|
||||
The tab associated with this event if it is a tab or content script.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var tabId : Float;
|
||||
/**
|
||||
If the type is content_script, this is the url of the script that was injected.
|
||||
Optional.
|
||||
**/
|
||||
@:optional
|
||||
var url : String;
|
||||
};
|
@@ -0,0 +1,7 @@
|
||||
package webextension_polyfill.activitylog;
|
||||
|
||||
/**
|
||||
The type of log entry. api_call is a function call made by the extension and api_event is an event callback to the
|
||||
extension. content_script is logged when a content script is injected.
|
||||
**/
|
||||
typedef OnExtensionActivityDetailsTypeTypeEnum = String;
|
@@ -0,0 +1,6 @@
|
||||
package webextension_polyfill.activitylog;
|
||||
|
||||
/**
|
||||
The type of view where the activity occurred. Content scripts will not have a viewType.
|
||||
**/
|
||||
typedef OnExtensionActivityDetailsTypeViewTypeEnum = String;
|
@@ -0,0 +1,17 @@
|
||||
package webextension_polyfill.activitylog;
|
||||
|
||||
/**
|
||||
Receives an activityItem for each logging event.
|
||||
**/
|
||||
typedef OnExtensionActivityEvent = {
|
||||
/**
|
||||
Registers an event listener <em>callback</em> to an event.
|
||||
**/
|
||||
function addListener(callback:(details:OnExtensionActivityDetailsType) -> Void, id:String):Void;
|
||||
/**
|
||||
Deregisters an event listener <em>callback</em> from an event.
|
||||
**/
|
||||
function removeListener(callback:(details:OnExtensionActivityDetailsType) -> Void):Void;
|
||||
function hasListener(callback:(details:OnExtensionActivityDetailsType) -> Void):Bool;
|
||||
function hasListeners():Bool;
|
||||
};
|
8
externs/webextension_polyfill/activitylog/Static.hx
Normal file
8
externs/webextension_polyfill/activitylog/Static.hx
Normal file
@@ -0,0 +1,8 @@
|
||||
package webextension_polyfill.activitylog;
|
||||
|
||||
typedef Static = {
|
||||
/**
|
||||
Receives an activityItem for each logging event.
|
||||
**/
|
||||
var onExtensionActivity : OnExtensionActivityEvent;
|
||||
};
|
Reference in New Issue
Block a user