tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

verify-storage-entries-module.js (685B)


      1 // Copyright 2023 The Chromium Authors
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 class SetKey0Operation {
      6  async run(data) {
      7    sharedStorage.set('key0-set-from-worklet', 'value0');
      8  }
      9 }
     10 
     11 class VerifyStorageEntriesURLSelectionOperation {
     12  async run(urls, data) {
     13    if (await sharedStorage.get('key0-set-from-worklet') === 'value0' &&
     14        await sharedStorage.get('key0-set-from-document') === 'value0') {
     15      return 1;
     16    }
     17 
     18    return -1;
     19  }
     20 }
     21 
     22 register('set-key0-operation', SetKey0Operation);
     23 
     24 register(
     25    'verify-storage-entries-url-selection-operation',
     26    VerifyStorageEntriesURLSelectionOperation);