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 // custom <any valid identifier> <description>
21 // The <description> for custom counters will be appended to "Whether a
22 // dedicated worker " or "Whether a shared worker" or "Whether a service worker
23 // ", so phrase it appropriately. For instance, "constructs a
24 // Foo object" or "calls Bar.baz('some value')". It may contain any character
25 // (including whitespace).
27 // To actually cause use counters to be incremented, DOM methods
28 // and attributes must have a [UseCounter] extended attribute and be exposed to
29 // workers in the Web IDL file.
30 // Custom counters are incremented when
31 // SetUseCounter(UseCounterWoker::Custom_MyName) is called on a WorkerPrivate
34 // You might reasonably ask why we have this file and we require
35 // annotating things with [UseCounter] in the relevant WebIDL file as
36 // well. Generating things from bindings codegen and ensuring all the
37 // dependencies were correct would have been rather difficult.
40 method PushManager.subscribe
41 method PushSubscription.unsubscribe
47 method console.countReset
58 method console.groupCollapsed
59 method console.groupEnd
61 method console.timeLog
62 method console.timeEnd
63 method console.exception
64 method console.timeStamp
65 method console.profile
66 method console.profileEnd