--- title: 'Element: DOMActivate イベント' slug: Web/API/Element/DOMActivate_event tags: - API - DOM - Deprecated - Element - Event - Input - Mouse Events - MouseEvent - Reference - activate event - onactivate translation_of: Web/API/Element/DOMActivate_event --- <p>{{APIRef}}</p> <div>{{Deprecated_Header}}</div> <p><code><strong>DOMActivate</strong></code> イベントは、要素がアクティブになったとき、例えば、マウスを使ったりキーを押したりしてそこに移動したときに発行されます。</p> <table class="properties"> <tbody> <tr> <th scope="row">バブリング</th> <td>あり</td> </tr> <tr> <th scope="row">キャンセル</th> <td>可</td> </tr> <tr> <th scope="row">インターフェイス</th> <td>{{domxref("MouseEvent")}}</td> </tr> </tbody> </table> <h2 id="Examples" name="Examples">例</h2> <pre class="brush: html notranslate"><svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny" xmlns:ev="http://www.w3.org/2001/xml-events" width="6cm" height="5cm" viewBox="0 0 600 500"> <desc>Example: invoke an ECMAScript function from a DOMActivate event</desc> <!-- ECMAScript to change the radius --> <script type="application/ecmascript"><![CDATA[ function change(evt) { var circle = evt.target; var currentRadius = circle.getFloatTrait("r"); if (currentRadius == 100) circle.setFloatTrait("r", currentRadius * 2); else circle.setFloatTrait("r", currentRadius * 0.5); } ]]></script> <!-- Act on each DOMActivate event --> <circle cx="300" cy="225" r="100" fill="red"> <handler type="application/ecmascript" ev:event="DOMActivate"> change(evt); </handler> </circle> <text x="300" y="480" font-family="Verdana" font-size="35" text-anchor="middle"> Activate the circle to change its size </text> </svg> </pre> <p>{{EmbedLiveSample("Examples", 640, 200)}}</p> <h2 id="Specifications" name="Specifications">仕様書</h2> <table class="standard-table"> <thead> <tr> <th scope="col">仕様書</th> <th scope="col">状態</th> </tr> </thead> <tbody> <tr> <td>{{SpecName('UI Events', '#event-type-DOMActivate', 'DOMActivate')}}</td> <td>{{Spec2('UI Events')}}</td> </tr> </tbody> </table> <h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2> <p>{{Compat("api.Element.DOMActivate_event")}}</p> <h2 id="See_also" name="See_also">関連情報</h2> <ul> <li>{{domxref("MouseEvent")}}</li> <li>{{domxref("Element/mousedown_event", "mousedown")}}</li> <li>{{domxref("Element/mouseup_event", "mouseup")}}</li> <li>{{domxref("Element/mousemove_event", "mousemove")}}</li> </ul>