From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/console/timestamp/index.html | 98 ++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 files/zh-cn/web/api/console/timestamp/index.html (limited to 'files/zh-cn/web/api/console/timestamp') diff --git a/files/zh-cn/web/api/console/timestamp/index.html b/files/zh-cn/web/api/console/timestamp/index.html new file mode 100644 index 0000000000..ed92f19a27 --- /dev/null +++ b/files/zh-cn/web/api/console/timestamp/index.html @@ -0,0 +1,98 @@ +--- +title: Console.timeStamp() +slug: Web/API/Console/timeStamp +translation_of: Web/API/Console/timeStamp +--- +
{{APIRef("Console API")}}{{Non-standard_header}}
+ +

向浏览器的 Performance 或者 Waterfall 工具添加一个标记。这样可以让你将代码中的一个点和其他在时间轴上已记录的事件相关联,例如布局事件和绘制事件等。

+ +

你可以选择用一个参数来作为时间戳标签,然后标记旁边就会显示这个标签。

+ +

{{AvailableInWorkers}}

+ +

Syntax

+ +
console.timeStamp(label);
+
+ +

Parameters

+ +
+
label
+
Label for the timestamp. Optional.
+
+ +

Browser compatibility

+ +

{{CompatibilityTable}}

+ +
{{CompatUnknown}} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Available in workers{{CompatVersionUnknown}}{{CompatGeckoDesktop("38.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatGeckoMobile("10.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Available in workers{{CompatUnknown}}{{CompatGeckoMobile("38.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

See also

+ + -- cgit v1.2.3-54-g00ecf