Skip to content

Commit

Permalink
Add trusted-set-session-storage-item scriptlet
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Nov 13, 2023
1 parent a373efe commit f3d6a21
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions assets/resources/scriptlets.js
Original file line number Diff line number Diff line change
Expand Up @@ -3870,6 +3870,19 @@ function trustedSetLocalStorageItem(key = '', value = '') {
setLocalStorageItemFn('local', true, key, value);
}

builtinScriptlets.push({
name: 'trusted-set-session-storage-item.js',
requiresTrust: true,
fn: trustedSetSessionStorageItem,
world: 'ISOLATED',
dependencies: [
'set-local-storage-item.fn',
],
});
function trustedSetSessionStorageItem(key = '', value = '') {
setLocalStorageItemFn('session', true, key, value);
}

/*******************************************************************************
*
* trusted-replace-fetch-response.js
Expand Down

0 comments on commit f3d6a21

Please sign in to comment.