非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
Calling this API immediately after console.profile() can cause it to not work. To work around this, call it in a setTimeout with at least 5ms delay. See bug 1240249 .
The profileEnd method stops recording a profile previously started with
Console.profile()
.
You can optionally supply an argument to name the profile. Doing so enables you to stop only that profile if you have multiple profiles being recorded.
Console.profileEnd()
is passed a profile name, and it matches the name of a profile being recorded, then that profile is stopped.
Console.profileEnd()
is passed a profile name and it does not match the name of a profile being recorded, no changes will be made.
Console.profileEnd()
is not passed a profile name, the most recently started profile is stopped.
console.profileEnd(profileName);
profileName
The name to give the profile. This parameter is optional.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
profileEnd
非标
|
Chrome Yes | Edge 12 | Firefox Yes | IE Yes | Opera ? | Safari ? | WebView Android Yes | Chrome Android Yes | Firefox Android 10 | Opera Android ? | Safari iOS ? | Samsung Internet Android Yes |
完整支持
兼容性未知
实验。期望将来行为有所改变。
非标。预期跨浏览器支持较差。