EventCounts
Baseline
2025
æè¿å©ç¨å¯è½
December 2025以éããã®æ©è½ã¯ææ°ã®ãã¼ã¸ã§ã³ã®ç«¯æ«ããã³ãã©ã¦ã¶ã¼ã§åä½ãã¾ããå¤ã端æ«ããã©ã¦ã¶ã¼ã§ã¯åä½ããªããã¨ãããã¾ãã
EventCounts ã¯ããã©ã¼ãã³ã¹ APIã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã§ãããããã®ã¤ãã³ãåã§é
ä¿¡ãããã¤ãã³ãã®æ°ãæä¾ãã¾ãã
EventCounts ã¤ã³ã¹ã¿ã³ã¹ã¯èªã¿åãå°ç¨ã® Map 風ãªãã¸ã§ã¯ãã§ãåãã¼ã¯ã¤ãã³ãåã®ååã®æååã§ã対å¿ããå¤ã¯ãã®ã¤ãã³ãåã§é
ä¿¡ãããã¤ãã³ãã®æ°ãç¤ºãæ´æ°ã§ãã
ã³ã³ã¹ãã©ã¯ã¿ã¼
ãã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã«ã¯ã³ã³ã¹ãã©ã¯ã¿ã¼ãããã¾ãããé常㯠performance.eventCounts ããããã£ã使ç¨ãã¦ãã®ãªãã¸ã§ã¯ãã®ã¤ã³ã¹ã¿ã³ã¹ãåå¾ãã¾ãã
ã¤ã³ã¹ã¿ã³ã¹ããããã£
size-
詳ããã¯
Map.prototype.sizeãåç §ãã¦ãã ããã
ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ãã
entries()-
詳ããã¯
Map.prototype.entries()ãåç §ãã¦ãã ããã forEach()-
詳ããã¯
Map.prototype.forEach()ãåç §ãã¦ãã ããã get()-
詳ããã¯
Map.prototype.get()ãåç §ãã¦ãã ããã has()-
詳ããã¯
Map.prototype.has()ãåç §ãã¦ãã ããã keys()-
詳ããã¯
Map.prototype.keys()ãåç §ãã¦ãã ããã values()-
詳ããã¯
Map.prototype.values()ãåç §ãã¦ãã ããã
ä¾
>EventCount ãããã®ä½¿ç¨
以ä¸ã¯ EventCounts ãããããæ
å ±ãåå¾ããããã¤ãã®ä¾ã§ãããããã¯èªã¿åãå°ç¨ã®ããã clear(), delete(), set() ã¡ã½ããã¯å©ç¨ã§ããªããã¨ã«æ³¨æãã¦ãã ããã
for (entry of performance.eventCounts.entries()) {
const type = entry[0];
const count = entry[1];
}
const clickCount = performance.eventCounts.get("click");
const isExposed = performance.eventCounts.has("mousemove");
const exposedEventsCount = performance.eventCounts.size;
const exposedEventsList = [...performance.eventCounts.keys()];
仿§æ¸
| 仿§æ¸ |
|---|
| Event Timing API > # sec-event-counts > |