Skip to content

Commit

Permalink
spec: Define configuration methods IDL (#39)
Browse files Browse the repository at this point in the history
This commit defines the IDL for Controlled Frame's configuration related
APIs. These include
* clearData
* getAudioState
* getZoom
* isAudioMuted
* setAudioMuted
* setZoom
* and related types
  • Loading branch information
odejesush authored Feb 13, 2024
1 parent 467cbd1 commit 4665881
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,14 @@ interface ControlledFrame : HTMLElement {
undefined removeContentScripts(sequence<DOMString>? scriptNameList);

// Configuration methods.
undefined clearData();
undefined getAudioState();
undefined getZoom();
undefined isAudioMuted();
undefined setAudioMuted();
undefined setZoom();
Promise<undefined> clearData(
optional ClearDataOptions options = {},
optional ClearDataTypeSet types = {});
Promise<boolean> getAudioState();
Promise<long> getZoom();
Promise<boolean> isAudioMuted();
undefined setAudioMuted(boolean mute);
Promise<undefined> setZoom(long zoomFactor);

// Capture methods.
undefined captureVisibleRegion();
Expand Down Expand Up @@ -559,6 +561,24 @@ dictionary ContentScriptDetails {
## Configuration methods ## {#api-config}
<!-- ====================================================================== -->

<xmp class="idl">
dictionary ClearDataOptions {
long since;
};

dictionary ClearDataTypeSet {
boolean appcache;
boolean cache;
boolean cookies;
boolean fileSystems;
boolean indexedDB;
boolean localStorage;
boolean persistentCookies;
boolean sessionCookies;
boolean webSQL;
};
</xmp>

<!-- ====================================================================== -->
## Capture methods ## {#api-capture}
<!-- ====================================================================== -->
Expand Down

0 comments on commit 4665881

Please sign in to comment.