summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/clipboard.json
blob: 010a003c4c3e7ef354a1c93606093afd62171089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[
  {
    "namespace": "clipboard",
    "description": "Offers the ability to write to the clipboard. Reading is not supported because the clipboard can already be read through the standard web platform APIs.",
    "permissions": ["clipboardWrite"],
    "functions": [
      {
        "name": "setImageData",
        "type": "function",
        "description": "Copy an image to the clipboard. The image is re-encoded before it is written to the clipboard. If the image is invalid, the clipboard is not modified.",
        "async": true,
        "parameters": [
          {
            "type": "object",
            "isInstanceOf": "ArrayBuffer",
            "additionalProperties": true,
            "name": "imageData",
            "description": "The image data to be copied."
          },
          {
            "type": "string",
            "name": "imageType",
            "enum": ["jpeg", "png"],
            "description": "The type of imageData."
          }
        ]
      }
    ]
  }
]