Эта статья нуждается в техническом обзоре. Как вы можете помочь.
Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!
The clearMeasures()
method removes the named measure from the browser's performance entry buffer. If the method is called with no arguments, all performance entries
with an entry type
of "measure
" will be removed from the performance entry buffer.
Syntax
performance.clearMeasures(); performance.clearMeasures(name);
Arguments
- name Optional
- A
DOMString
representing the name of the timestamp. If this argument is omitted, allperformance entries
with anentry type
of "measure
" will be removed.
Return value
- void
Example
The following example shows both uses of the clearMeasures()
method.
function clear_measure(name) { if (performance.clearMeasures === undefined) { console.log("performance.clearMeasures Not supported"); return; } // Remove all "measure" performance entry types with the specified name performance.clearMeasures(name); } function clear_all_measures() { if (performance.clearMeasures === undefined) { console.log("performance.clearMeasures Not supported"); return; } // Remove all "measure" type performance entries from the performance buffer performance.clearMeasures(); }
Specifications
Specification | Status | Comment |
---|---|---|
User Timing The definition of 'clearMeasures()' in that specification. |
Editor's Draft | Clarifies clearMeasures() . |
User Timing The definition of 'clearMeasures()' in that specification. |
Recommendation | Basic definition. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 43.0 | 41 | 10 | 33 | No support |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | Firefox OS | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|---|
Basic support | No support | 46.0 | 42 | 42 | 10 | 33 | No support | 46.0 |