Blink‎ > ‎

Deprecating Features

How To Measure Usage and Notify Developers

  1. Add your feature to the UseCounter::Feature enum.
  2. Add a clever deprecation message to the big switch in UseCounter::deprecationMessage.
  3. Instrument your code by either:
    • Adding DeprecateAs=[your enum value here] to the feature's IDL definition (see window.performance.webkitGetEntries, for example).
    • Adding a call to UseCounter::countDeprecation somewhere relevant (as we're dong for the prefixed Content Security Policy headers).
Note that DeprecateAs is intended to replace MeasureAs in the IDL file. Specifying both is redundant.