Automatic update from web-platform-testsUpdate the budget-api IDL file (#9763) * Add budget-api idl file wpt-commits: 67c2a8716f759462e96f384d3f207a5e1b8b3add wpt-pr: 9763 wpt-commits: 67c2a8716f759462e96f384d3f207a5e1b8b3add wpt-pr: 9763
32 lines
766 B
Plaintext
32 lines
766 B
Plaintext
// GENERATED CONTENT - DO NOT EDIT
|
|
// Content of this file was automatically extracted from the budget-api spec.
|
|
// See https://wicg.github.io/budget-api/
|
|
|
|
[Exposed=Window]
|
|
partial interface Navigator {
|
|
[SameObject] readonly attribute BudgetService budget;
|
|
};
|
|
|
|
[Exposed=Worker]
|
|
partial interface WorkerNavigator {
|
|
[SameObject] readonly attribute BudgetService budget;
|
|
};
|
|
|
|
[Exposed=(Window,Worker)]
|
|
interface BudgetService {
|
|
Promise<double> getCost(OperationType operation);
|
|
Promise<sequence<BudgetState>> getBudget();
|
|
|
|
Promise<boolean> reserve(OperationType operation);
|
|
};
|
|
|
|
[Exposed=(Window,Worker)]
|
|
interface BudgetState {
|
|
readonly attribute double budgetAt;
|
|
readonly attribute DOMTimeStamp time;
|
|
};
|
|
|
|
enum OperationType {
|
|
"silent-push"
|
|
};
|