add firefox extension template

This commit is contained in:
2025-08-07 16:03:16 -05:00
parent 6cbb29fed1
commit 5df289ffcb
586 changed files with 13636 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
package webextension_polyfill.idle;
typedef IdleState = String;

View File

@@ -0,0 +1,18 @@
package webextension_polyfill.idle;
typedef Static = {
/**
Returns "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
**/
function queryState(detectionIntervalInSeconds:Float):js.lib.Promise<IdleState>;
/**
Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events.
The default interval is 60 seconds.
**/
function setDetectionInterval(intervalInSeconds:Float):Void;
/**
Fired when the system changes to an active or idle state. The event fires with "idle" if the the user has not generated
any input for a specified number of seconds, and "active" when the user generates input on an idle system.
**/
var onStateChanged : webextension_polyfill.events.Event<(newState:IdleState) -> Void>;
};