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/.
5 // This file defines a list of use counters, which are things that can
6 // record usage of Web platform features and then report this information
9 // The format of this file is very strict. Each line can be:
13 // (b) a comment, which is a line that begins with "//"
15 // (c) one of four possible use counter declarations:
17 // method <IDL interface name>.<IDL operation name>
18 // attribute <IDL interface name>.<IDL attribute name>
19 // property <CSS property method name>
20 // custom <any valid identifier> <description>
22 // The |CSS property method name| should be CamelCase form of the property
23 // name with -moz- and -x- prefix removed.
25 // The <description> for custom counters will be appended to "When a document "
26 // or "When a page ", so phrase it appropriately. For instance, "constructs a
27 // Foo object" or "calls Document.bar('some value')". It may contain any
28 // character (including whitespace).
30 // To actually cause use counters to be incremented, DOM methods
31 // and attributes must have a [UseCounter] extended attribute in
32 // the Web IDL file. CSS properties require no special treatment
33 // beyond being listed below. Custom counters are incremented when
34 // SetDocumentAndPageUseCounter(eUseCounter_custom_MyName) is called on an
35 // ns(I)Document object.
37 // You might reasonably ask why we have this file and we require
38 // annotating things with [UseCounter] in the relevant WebIDL file as
39 // well. Generating things from bindings codegen and ensuring all the
40 // dependencies were correct would have been rather difficult, and
41 // annotating the WebIDL files does nothing for identifying CSS
42 // property usage, which we would also like to track.
44 method SVGSVGElement.getElementById
45 attribute SVGSVGElement.currentScale
48 attribute XMLDocument.async
49 attribute DOMError.name
50 attribute DOMError.message
51 custom DOMErrorConstructor constructed a DOMError
54 method PushManager.subscribe
55 method PushSubscription.unsubscribe
58 attribute Window.sidebar
61 method OfflineResourceList.swapCache
62 method OfflineResourceList.update
63 attribute OfflineResourceList.status
64 attribute OfflineResourceList.onchecking
65 attribute OfflineResourceList.onerror
66 attribute OfflineResourceList.onnoupdate
67 attribute OfflineResourceList.ondownloading
68 attribute OfflineResourceList.onprogress
69 attribute OfflineResourceList.onupdateready
70 attribute OfflineResourceList.oncached
71 attribute OfflineResourceList.onobsolete
73 // Non-standard IndexedDB API
74 method IDBDatabase.createMutableFile
75 method IDBDatabase.mozCreateFileHandle
76 method IDBMutableFile.open
77 method IDBMutableFile.getFile
79 // DataTransfer API (gecko-only methods)
80 method DataTransfer.addElement
81 attribute DataTransfer.mozItemCount
82 attribute DataTransfer.mozCursor
83 method DataTransfer.mozTypesAt
84 method DataTransfer.mozClearDataAt
85 method DataTransfer.mozSetDataAt
86 method DataTransfer.mozGetDataAt
87 attribute DataTransfer.mozUserCancelled
88 attribute DataTransfer.mozSourceNode
91 custom onstart sets a <marquee> onstart event listener
92 custom onbounce sets a <marquee> onbounce event listener
93 custom onfinish sets a <marquee> onfinish event listener
95 // JavaScript feature usage
96 custom JS_asmjs uses asm.js
97 custom JS_wasm uses WebAssembly
100 method console.assert
103 method console.countReset
112 method console.dirxml
114 method console.groupCollapsed
115 method console.groupEnd
117 method console.timeLog
118 method console.timeEnd
119 method console.exception
120 method console.timeStamp
121 method console.profile
122 method console.profileEnd
124 // document.open information
125 custom DocumentOpen calls document.open in a way that creates a new Window object
127 custom FilteredCrossOriginIFrame cross-origin <iframe> within a CSS/SVG filter
130 method CustomElementRegistry.define
133 method Element.attachShadow
135 // Media Device Access
136 method MediaDevices.enumerateDevices
137 custom EnumerateDevicesInsec calls MediaDevices.enumerateDevices from an insecure context
138 custom EnumerateDevicesUnfocused calls MediaDevices.enumerateDevices from a unfocused document
139 method MediaDevices.getUserMedia
140 method Navigator.mozGetUserMedia
141 custom GetUserMediaUnfocused calls MediaDevices.getUserMedia from an unfocused document
142 custom GetUserMediaInsec calls MediaDevices.getUserMedia from an insecure context
143 custom MozGetUserMediaInsec calls Navigator.mozGetUserMedia from an insecure context
144 custom GetUserMediaXOrigin calls MediaDevices.getUserMedia from a cross origin context
145 custom MozGetUserMediaXOrigin calls Navigator.mozGetUserMedia from a cross origin context
146 method MediaDevices.getDisplayMedia
147 custom GetDisplayMediaXOrigin calls MediaDevices.getDisplayMedia from a cross origin context