tor-browser

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

array-buffer.js (636B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 "use strict";
      5 
      6 const protocol = require("resource://devtools/shared/protocol.js");
      7 const { Arg, RetVal, generateActorSpec } = protocol;
      8 
      9 const arrayBufferSpec = generateActorSpec({
     10  typeName: "arraybuffer",
     11 
     12  methods: {
     13    slice: {
     14      request: {
     15        start: Arg(0),
     16        count: Arg(1),
     17      },
     18      response: RetVal("json"),
     19    },
     20    release: { release: true },
     21  },
     22 });
     23 
     24 exports.arrayBufferSpec = arrayBufferSpec;