toggle ( ontoggle )イベント
toggle ( ontoggle )イベントは、<details> エレメントを開くまたは閉じると発生するイベントです。
document.getElementById("exmpl_video").ontoggle = ( event )=>{
console.log( event );
};
詳しくは Example を参照してください
ページ内 Index
構文(Syntax)
in HTML
<tagelement ontoggle="function()">
in JavaScript
object.ontoggle = function(){ }; object.addEventListener("toggle", script_);
備考(Remarks)
Bubbles | No |
Cancelable | No |
Interface | Event |
Supported HTML Elements | <detail> |
Example
toggle ( ontoggle )イベントの例です。<details> エレメントを開閉するたびにこのイベントが発生します。