summaryrefslogtreecommitdiffstats
path: root/browser/components/urlbar/tests/ext/schema.json
blob: 26b0df5a34c28059265e8c4c27ae756360d37682 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[
  {
    "namespace": "experiments.urlbar",
    "description": "APIs supporting urlbar experiments",
    "types": [
      {
        "id": "DynamicResultType",
        "type": "object",
        "description": "Describes a dynamic result type.",
        "properties": {
          "viewTemplate": {
            "type": "object",
            "description": "An object describing the type's view.",
            "additionalProperties": true
          }
        }
      }
    ],
    "properties": {
      "attributionURL": {
        "$ref": "types.Setting",
        "description": "Gets or sets the attribution URL for the current browser session."
      },
      "engagementTelemetry": {
        "$ref": "types.Setting",
        "description": "Enables or disables the engagement telemetry for the current browser session."
      },
      "extensionTimeout": {
        "$ref": "types.Setting",
        "description": "Sets the amount of time in ms that extensions have to return results to the browser.urlbar API."
      }
    },
    "events": [
      {
        "name": "onViewUpdateRequested",
        "type": "function",
        "description": "Fired when the urlbar view updates the view of one of the results of the provider.",
        "parameters": [
          {
            "name": "payload",
            "type": "object",
            "description": "The result's payload."
          },
          {
            "name": "idsByName",
            "type": "object",
            "description": "A Map from an element's name, as defined by the provider; to its ID in the DOM, as defined by the browser."
          }
        ],
        "extraParameters": [
          {
            "name": "providerName",
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]+$",
            "description": "The name of the provider you want to provide updates for."
          }
        ],
        "returns": {
          "type": "object",
          "description": "An object describing the view update."
        }
      }
    ],
    "functions": [
      {
        "name": "addDynamicResultType",
        "type": "function",
        "async": true,
        "description": "Adds a dynamic result type. See UrlbarResult.addDynamicResultType().",
        "parameters": [
          {
            "name": "name",
            "type": "string",
            "description": "The name of the result type."
          },
          {
            "name": "type",
            "type": "object",
            "default": {},
            "optional": true,
            "description": "The result type. Currently this should be an empty object (which is the default value)."
          }
        ]
      },
      {
        "name": "addDynamicViewTemplate",
        "type": "function",
        "async": true,
        "description": "Adds a view template for a dynamic result type. See UrlbarView.addDynamicViewTemplate().",
        "parameters": [
          {
            "name": "name",
            "type": "string",
            "description": "The view template will be registered for the dynamic result type with this name."
          },
          {
            "name": "viewTemplate",
            "type": "object",
            "additionalProperties":  true,
            "description": "The view template."
          }
        ]
      },
      {
        "name": "clearInput",
        "type": "function",
        "async": true,
        "description": "Sets urlbar.value to the empty string and the pageproxystate to invalid.",
        "parameters": []
      }
    ]
  }
]