diff --git a/source b/source index 696823da581..07b2df2d4e4 100644 --- a/source +++ b/source @@ -59788,25 +59788,64 @@ interface HTMLDetailsElement : HTMLElement { exists, user agents can still provide this ability through some other user interface affordance.
+Every details
element has a details toggle task tracker, which is a
+ toggle task tracker or null, initially null.
Whenever the open
attribute is added to or removed from
- a details
element, the user agent must queue an element task on the
- DOM manipulation task source given then details
element that runs the
- following steps, which are known as the details notification task steps, for this
- details
element:
details
element, the user agent must run the following steps, which are known as
+ the details notification task steps, for this details
element:
+
+ When the open
attribute is toggled several
+ times in succession, the resulting tasks essentially get coalesced so that only one event is
+ fired.
If the open
attribute is added, queue a
+ details toggle event task given the details
element, "closed
", and "open
".
Otherwise, queue a details toggle event task given the details
+ element, "open
", and "closed
".
To queue a details toggle event task given a details
element
+ element, a string oldState, and a string newState:
If another task has been queued to run the details notification task steps for this
- details
element, then return.
If element's details toggle task tracker is not null, then:
-When the open
attribute is toggled
- several times in succession, these steps essentially get coalesced so that only one event is
- fired.
Set oldState to element's details toggle task + tracker's old state.
Remove element's details toggle task tracker's task from its task queue.
Set element's details toggle task tracker to null.
Fire an event named toggle
at the details
element.
Queue an element task given the DOM manipulation task source and + element to run the following steps:
+ +Fire an event named toggle
at element, using ToggleEvent
, with
+ the oldState
attribute initialized to
+ oldState and the newState
attribute
+ initialized to newState.
Set element's details toggle task tracker to null.
Set element's details toggle task tracker to a struct with task set to the just-queued task and old state set + to oldState.
The open
@@ -77613,6 +77652,53 @@ partial interface {
+
ToggleEvent
interface[Exposed=Window]
+interface ToggleEvent : Event {
+ constructor(DOMString type, optional ToggleEventInit eventInitDict = {});
+ readonly attribute DOMString oldState;
+ readonly attribute DOMString newState;
+};
+
+dictionary ToggleEventInit : EventInit {
+ DOMString oldState = "";
+ DOMString newState = "";
+};
+
+ event.oldState
Set to "closed
" when transitioning from closed to open, or set to
+ "open
" when transitioning from open to closed.
event.newState
Set to "open
" when transitioning from closed to open, or set to "closed
" when transitioning from open to closed.
The oldState
and newState
attributes must return the values they are
+ initialized to.
A toggle task tracker is a struct which has:
+ +ToggleEvent
.oldState
attribute.Every HTML element has a popover showing or hiding, which is a boolean, initially set to false.
-Every HTML element has a popover toggle task, - initially null, which is either null or a struct which has:
- -ToggleEvent
.oldState
attribute.Every HTML element popover toggle task tracker, + which is a toggle task tracker or null, initially null.
The following attribute change steps, given element, localName, oldValue, @@ -82776,16 +82853,16 @@ dictionary DragEventInit : MouseEventInit {
If element's popover toggle task is not null, then:
+If element's popover toggle task tracker is not null, then:
Set oldState to element's popover toggle task's - old state.
Set oldState to element's popover toggle task + tracker's old state.
Remove element's popover toggle task's task from its task queue.
Remove element's popover toggle task tracker's task from its task queue.
Set element's popover toggle task to null.
Set element's popover toggle task tracker to null.
fire an event named toggle
, using ToggleEvent
, with the oldState
attribute initialized to oldState,
- and the newState
attribute initialized to
- newState at element.
Fire an event named toggle
at element, using ToggleEvent
, with
+ the oldState
attribute initialized to
+ oldState and the newState
attribute
+ initialized to newState.
Set element's popover toggle task to null.
Set element's popover toggle task tracker to null.
Set element's popover toggle task to a struct with task set to the just-queued task and old - state set to oldState.
Set element's popover toggle task tracker to a struct with task set to the just-queued task and old state set + to oldState.
The hidePopover()
@@ -82873,7 +82950,7 @@ dictionary DragEventInit : MouseEventInit {
Fire an event named beforetoggle
, using ToggleEvent
, with the oldState
attribute initialized to "open
", and the newState
+ data-x="">open" and the newState
attribute initialized to "closed
" at element.
ToggleEvent
interface[Exposed=Window]
-interface ToggleEvent : Event {
- constructor(DOMString type, optional ToggleEventInit eventInitDict = {});
- readonly attribute DOMString oldState;
- readonly attribute DOMString newState;
-};
-
-dictionary ToggleEventInit : EventInit {
- DOMString oldState = "";
- DOMString newState = "";
-};
-
- event.oldState
Set to "closed
" when transitioning from closed to open, or set to
- "open
" when transitioning from open to closed.
event.newState
Set to "open
" when transitioning from closed to open, or set to "closed
" when transitioning from open to closed.
The oldState
attribute must return the value it
- was initialized to. It is initialized to "open
" if the element with the
- popover
attribute's popover visibility state is
- showing; otherwise "closed
".
The newState
attribute must return the value it was
- initialized to. It is initialized to "closed
" if the element with the popover
attribute's popover visibility state is showing; otherwise "open
".
toggle
- Event
or ToggleEvent
+ ToggleEvent
details
and popover elements
details
elements when they open or close; fired on elements with the
popover
attribute when they are transitioning between