aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/performanceresourcetiming/domainlookupstart/index.html
blob: abf9139b69cff30a333fbff308bcc10cc6d5bd86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
title: PerformanceResourceTiming.domainLookupStart
slug: Web/API/PerformanceResourceTiming/domainLookupStart
tags:
  - API
  - Web パフォーマンス
  - プロパティ
  - リファレンス
translation_of: Web/API/PerformanceResourceTiming/domainLookupStart
---
<div>{{APIRef("Resource Timing API")}}</div>

<p><strong><code>domainLookupStart</code></strong> 読み取り専用プロパティは、ブラウザがリソースのドメイン名検索を開始する直前に {{domxref("DOMHighResTimeStamp","timestamp")}} を返します。</p>

<p>{{AvailableInWorkers}}</p>

<h2 id="Syntax" name="Syntax">構文</h2>

<pre class="syntaxbox"><em>resource</em>.domainLookupStart;
</pre>

<h3 id="Return_Value" name="Return_Value">戻り値</h3>

<p>ブラウザがリソースのドメイン名検索を開始する直前の {{domxref("DOMHighResTimeStamp")}}</p>

<h2 id="例"></h2>

<p>次の例では、すべての "<code>resource</code>" {{domxref("PerformanceEntry.entryType","type")}} イベントの <code>*Start</code> プロパティと <code>*End</code> プロパティの値が記録されます。</p>

<pre class="brush: js">function print_PerformanceEntries() {
  // Use getEntriesByType() to just get the "resource" events
  var p = performance.getEntriesByType("resource");
  for (var i=0; i &lt; p.length; i++) {
    print_start_and_end_properties(p[i]);
  }
}
function print_start_and_end_properties(perfEntry) {
  // Print timestamps of the PerformanceEntry *start and *end properties
  properties = ["connectStart", "connectEnd",
                "domainLookupStart", "domainLookupEnd",
                "fetchStart",
                "redirectStart", "redirectEnd",
                "requestStart",
                "responseStart", "responseEnd",
                "secureConnectionStart"];

  for (var i=0; i &lt; properties.length; i++) {
    // check each property
    var supported = properties[i] in perfEntry;
    if (supported) {
      var value = perfEntry[properties[i]];
      console.log("... " + properties[i] + " = " + value);
    } else {
      console.log("... " + properties[i] + " = NOT supported");
    }
  }
}
</pre>

<h2 id="仕様">仕様</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">ステータス</th>
   <th scope="col">コメント</th>
  </tr>
  <tr>
   <td>{{SpecName('Resource Timing', '#widl-PerformanceResourceTiming-domainLookupStart', 'domainLookupStart')}}</td>
   <td>{{Spec2('Resource Timing')}}</td>
   <td>初期定義</td>
  </tr>
 </tbody>
</table>

<h2 id="ブラウザの互換性">ブラウザの互換性</h2>

<p>{{Compat("api.PerformanceResourceTiming.domainLookupStart")}}</p>