From 23295b0a9f138cc2749cd191cf9a7c06ecb1d1a4 Mon Sep 17 00:00:00 2001
From: Joey Arhar
If removedNode is not in the no pop-up + state, then run the hide pop-up algorithm with element set to + removedNode, focus previous element set to false, and hide immediately set to + true.
A The algorithm to update
- animations and send events is defined in Web Animations. . The following features and terms are defined in the Web Animations
+ specification: Implementations that support scripting must support the CSS Object Model. The following
features and terms are defined in the CSSOM specifications:
@@ -10001,6 +10014,21 @@ partial interface Document {
The The The The The The DOM defines the Run this element's input activation behavior, if any, and do nothing
otherwise. Run the pop-up target attribute activation behavior on
+ this. Recall that an element's activation behavior runs for both
@@ -51432,13 +51472,11 @@ interface HTMLButtonElement : HTMLElement {
If element is disabled, then
return. If element does not have a form owner, then return. If element's node document is not fully active, then
return. Switch on element's If element has a form owner then switch on element's Do nothing. Run the pop-up target attribute activation behavior on
+ this. Let topDocument be the active document of control's
+ Let top document be the active document of control's
node document's browsing context's
top-level browsing context. If control's node document's origin is not the same
- as the origin of topDocument, then
+ as the origin of top document, then
return. Empty topDocument's
+ Empty top document's
autofocus candidates. Set topDocument's autofocus processed flag to true. Set top document's autofocus processed flag to true. If at any time a preventDefault()
method
id
attributesetAttribute()
methodgetAttribute()
methodtextContent
attributeclick
eventcontextmenu
eventdblclick
eventfocusin
eventinput
eventmousedown
eventmouseenter
event
+
Document
has a navigation
id, which is a navigation id or null.Document
has a pop-up stack, which is a stack,
+ initially empty.Document
has a pop-up hint showing, which is an
+ HTMLElement
, initially null.Document
has pop-ups waiting to hide, which is a set,
+ initially empty.Document
has all open pop-ups, which is a set,
+ initially empty.Document
has a pop-up mousedown target, which is an
+ Element
, initially null.The
DocumentOrShadowRoot
interfaceouterText;
ElementInternals attachInternals();
+
+ // The Pop-up API
+ [RaisesException] void showPopUp();
+ [RaisesException] void hidePopUp();
+ [Unscopable,CEReactions,Reflect,ReflectOnly=("auto","hint","manual"),ReflectEmpty="auto",ReflectInvalid] attribute DOMString? popUp;
+ [CEReactions,Reflect] attribute boolean defaultOpen;
+ [CEReactions,Reflect] attribute DOMString? popUpToggleTarget;
+ [CEReactions,Reflect] attribute DOMString? popUpHideTarget;
+ [CEReactions,Reflect] attribute DOMString? popUpShowTarget;
};
HTMLElement includes GlobalEventHandlers;
@@ -46378,6 +46415,9 @@ interface HTMLInputElement : HTMLElement {
type
attribute's state:type
attribute's state:
dialog
element is :top-layer
The :top-layer
pseudo-class is defined
+ to match an open pop-up
element.
:enabled
The :enabled
pseudo-class must match any
@@ -77070,15 +77117,15 @@ END:VCARD
If old focus target is not a focusable area, then return.
Let topDocument be old chain's last entry.
Let top document be old chain's last entry.
If topDocument's browsing context has +
If top document's browsing context has system focus, then run the focusing steps - for topDocument's viewport.
+ for top document's viewport.Otherwise, apply any relevant platform-specific conventions for removing system focus from topDocument's system focus from top document's browsing context, and run the focus update steps with old chain, an empty list, and null respectively.
autofocus
attributeLet topDocument be the active document of target's +
Let top document be the active document of target's browsing context's top-level browsing context.
If topDocument's autofocus processed flag is false, then - remove the element from topDocument's +
If top document's autofocus processed flag is false, then + remove the element from top document's autofocus candidates, and append the element to - topDocument's autofocus candidates.
We do not check if an element is a focusable area before storing it in the autofocus candidates list, because even if it is not a focusable area when it is inserted, it could become one by the time flush autofocus candidates sees it.
-To flush autofocus candidates for a document topDocument, run these +
To flush autofocus candidates for a document top document, run these steps:
If topDocument's autofocus processed flag is true, then +
If top document's autofocus processed flag is true, then return.
Let candidates be topDocument's autofocus
+ Let candidates be top document's autofocus
candidates. If candidates is empty, then
return. If topDocument's focused area
- is not topDocument itself, or topDocument has non-null
+ If top document's focused area
+ is not top document itself, or top document has non-null
target element, then: Empty candidates. Set topDocument's autofocus processed flag to true. Set top document's autofocus processed flag to true. Return.
@@ -77765,7 +77813,7 @@ END:VCARD
continue.
If doc's browsing context's - top-level browsing context is not same as topDocument's + top-level browsing context is not same as top document's browsing context, then remove element from candidates, and continue.
Empty candidates.
Set topDocument's autofocus processed flag to true.
Set top document's autofocus processed flag to true.
Run the focusing steps for target.
popup
attributeAll Element
s may have the popup
content attribute set. The popup
attribute is an enumerated attribute. The
+ following table lists the states for this attribute:
State + | Keywords + |
---|---|
Auto state + | auto
+ |
The empty string + | |
Hint state + | hint
+ |
Manual state + | manual
+ |
The attribute may be omitted. The invalid value default + and the missing value default are both the no pop-up state. + +
Every element which is not in the no pop-up state + has an additional pop-up visibility state with these potential values:
+pop-up hidden state
pop-up transitioning state
pop-up showing state
Elements in the pop-up showing state must match the :top-layer
pseudo selector.
Elements in the pop-up hidden state must have a user-agent style of + display:none.
+ +The pop-up transitioning state and :top-layer
pseudo selectors exist to allow pop-ups to animate
+ open or closed because animating between display:none and other display values is not
+ possible.
Every element which is not in the no pop-up state + has the following members:
+An Element
called pop-up previously focused element, initially set to
+ null.
An Element
called pop-up invoker, initially set to null.
A map from Element
to DOMHighResTimeStamp
called
+ pop-up hover show tasks, initially empty.
A DOMHighResTimeStamp
called pop-up hover hide task, initially
+ null.
When an element's popup
attribute is modified such
+ that it goes from a valid value to the no pop-up state
+ while it is in the pop-up showing state, the hide pop-up algorithm
+ should be run with element set to element, focus previous element set to true, and hide
+ immediately set to false.
The showPopUp()
method
+ steps are:
If this's pop-up attribute is in the no pop-up state, then throw a
+ "NotSupportedError
" DOMException
.
If this is not in the pop-up hidden
+ state, then throw a "InvalidStateError
"
+ DOMException
.
If this is not connected, then throw a
+ "InvalidStateError
" DOMException
.
Let show event be an Event
named show
.
Fire show event at + this.
If show event's canceled flag is true, then return.
These validity checks are repeated because firing the show
+ event could have disconnected this element or changed its popup
+ attribute.
If this is not connected, return.
If this is in the no pop-up state, + return.
If this is in the pop-up showing state, return.
Let document be this's node document.
Let should restore focus be false.
If this is in the hint state, then + run the following steps:
+ +If document's pop-up hint showing is not null, then run hidePopUp
on document's pop-up hint
+ showing.
Let ancestor be the result of running the nearest open ancestral + pop-up algorithm with node set to this and inclusive set to false.
If ancestor is not null, then run hide + all pop-ups until with endpoint set to ancestor, focus previous element set + to false, hide immediately set to false, and hide unrelated set to true.
If this is in the auto state, then + run the following steps:
+ +Let ancestor be the result of running the nearest open ancestral + pop-up algorithm with node set to this and inclusive set to false.
Run hide all pop-ups until with endpoint + set to ancestor, focus previous element set to false, hide immediately set to false, + and hide unrelated set to true.
If this is in the auto state or + in the hint state, then run the following + steps:
+ +These validity checks are repeated because running hide all pop-ups until above could have fired the hide
event, and an event handler could have disconnected this
+ element or changed its popup
attribute.
If this's pop-up attribute is in the no pop-up state, then return.
If this is not in the pop-up hidden state, then + return.
If this is not connected, then return.
This ensures that focus is returned to the previously-focused element only for the first + pop-up in a stack.
+If the result of running topmost pop-up auto or hint on document + is null, then set should restore focus to true. Otherwise, set + should restore focus to false.
If this is in the auto state, + then push this onto document's pop-up stack.
If this is in the hint state, + then set document's pop-up hint showing to this.
Add this to document's all open pop-ups.
Stop this from waiting for any animations to resolve before running pop-up hide finish if needed.
If should restore focus is true, then set this's pop-up + previously focused element to the focused element. Otherwise, set + this's pop-up previously focused element to null.
Add this to document's top layer.
Set this's pop-up visibility state to pop-up transitioning + state.
Update the rendering for document.
Set this's pop-up visibility state to pop-up showing + state.
If no element is currently being hovered or + running is node pop-up descendant with element set to this and + potential descendant set to the currently hovered + element returns false, then run maybe queue pop-up hide event with element set + to this.
Run the pop-up focusing steps for this.
The hidePopUp()
method
+ steps are:
If this's pop-up attribute is in the no pop-up state, then throw a
+ "NotSupportedError
" DOMException
.
If this is not in the pop-up showing state, then throw a
+ "InvalidStateError
" DOMException
.
Run the hide pop-up algorithm with element set to this, focus + previous element set to true, and hide immediately set to false.
The hide pop-up algorithm, given an Element
element, a
+ boolean focus previous element, and a boolean hide immediately is as
+ follows:
Let document be element's node document.
If element is in the auto state or the + hint state:
+Run hide all pop-ups until with endpoint + set to element, focus previous element set to focus previous element, + hide immediately set to hide immediately, and hide unrelated set to false.
These validity checks are repeated because running hide all pop-ups until above could have fired the hide
event, and an event handler could have disconnected this
+ element or changed its popup
attribute.
If element is in the no pop-up + state, return.
If element is not connected, return.
If element is not in the pop-up showing state, return.
If element is in the auto state, + pop the top value from document's pop-up stack.
If element is in the hint state, + set document's pop-up hint showing to null.
Remove element from document's all open + pop-ups.
Add element to document's pop-ups waiting to + hide.
Let previous animations be the result of running getAnimations on element.
Set element's pop-up invoker to null.
Set element's pop-up visibility state to pop-up transitioning + state.
If hide immediately is true:
+Queue a global task on the user interaction task source given
+ element's relevant global object to fire an event named hide
at
+ element.
Run pop-up hide finish if needed on + element.
Return.
Fire an event named hide
at element.
If element is not connected, return.
If element is in the no pop-up state, + return.
If element is in the pop-up transitioning state, return.
Let animations be a set containing the result of running getAnimations on element.
Remove all items in animations which exist in + previous animations.
If animations is empty, run pop-up hide finish if needed on + element.
Let previously focused element be element's previously focused + element.
If previously focused element is not null:
+Set element's previously focused element to null.
If focus previous element is true, run focus + on previously focused element with preventScroll set to true.
If animations is not empty:
+Wait for each animation in animations to resolve as either canceled or finished.
Run pop-up hide finish if needed on + element.
The pop-up hide finish if needed algorithm,
+ given an Element
element, is as follows:
Remove element from element's node document's + pop-ups waiting to hide.
Remove element from the top layer.
Set element's pop-up visibility state to the pop-up hidden + state.
Stop element from waiting for any animations to resolve before running this + algorithm.
The hide all pop-ups until algorithm, given an
+ Element
endpoint, a boolean focus previous element, a boolean
+ hide immediately, and a boolean hide unrelated, is as follows:
Let document be endpoint's node document.
If hide immediately is true, then run the following steps:
+For each element waiting to hide in document's pop-ups waiting to + hide, run the following steps:
+Run pop-up hide finish if needed + with element set to element waiting to hide.
Clear document's pop-ups waiting to hide.
If endpoint is in the hint state and + hide unrelated is true, then run the following steps:
+If document's pop-up hint showing is not equal to + endpoint, then run the hide pop-up algorithm with element set to + endpoint, focus previous element set to focus previous element, and hide + immediately set to hide immediately.
While document's pop-up stack is not empty, run the following + steps:
+Run the hide pop-up algorithm with element set to endpoint, + focus previous element set to focus previous element, and hide immediately set to + hide immediately.
If endpoint is in the auto state or + endpoint is null, then run the following steps:
+Let hint ancestor be null.
If document's pop-up hint showing is not null:
+Let hint ancestor be the result of running the nearest open ancestral + pop-up algorithm with node set to document's pop-up hint + showing and inclusive set to false.
If hint ancestor is null and hide unrelated is true, then run the + hide pop-up algorithm with element set to document's pop-up + hint showing, focus previous element set to focus previous element and hide + immediately set to hide immediately.
While document's pop-up stack is not empty:
+If document's pop-up stack's top element is + hint ancestor, then run the hide pop-up algorithm with element set to + document's pop-up hint showing with focus previous element set to + focus previous element and hide immediately set to hide + immediately.
If document's pop-up stack's top element is equal to + endpoint, break.
Run the hide pop-up algorithm with element set to document's + pop-up stack's top element, focus previous element set to focus previous + element, and hide immediately set to hide immediately.
The hide all pop-ups until algorithm is used in + several cases to hide all pop-ups that don't stay open when something happens. For example, + during light-dismiss of a pop-up, this algorithm ensures that we close only the pop-ups that + aren't related to the Node clicked by the user. The interaction between popup=auto and popup=hint + is captured here, where a popup=hint that is "nested" inside a popup=auto is only hidden at the + appropriate time.
+The nearest open ancestral pop-up algorithm, given a Node
+ node and a boolean inclusive, is as follows:
Let document be node's node document.
Let hint showing be document's pop-up hint + showing.
Let anchors to pop-ups be an empty map.
For each pop-up in document's pop-up stack:
+Let anchor be the result of getting the + pop-up anchor element of pop-up.
If anchor is not null, map anchor to pop-up in + anchors to pop-ups.
If hint showing is not null:
+Let anchor be the result of running getting the pop-up anchor element of hint + showing.
If anchor is not null, map anchor to hint showing in + anchors to pop-ups.
Let pop-up positions be an empty map.
Let index be 0.
For each pop-up in document's pop-up stack:
+Map pop-up to index in pop-up positions.
Increment index by 1.
If hint showing is not null:
+Map hint showing to index in pop-up positions.
Increment index by 1.
Let new element be true if node is not in the no pop-up state and node is not in the + pop-up showing state.
If new element is true, then:
+Map node to index in pop-up positions.
Let upper bound be 2147483647.
If pop-up positions has a value for node, set upper bound to + pop-up position's value for node.
If hint showing is not null and new element is true, set + upper bound to pop-up position's value for hint showing.
If inclusive is true:
+Let current node be node.
While current node has a parent node within the flat tree:
+If current node is not in the no pop-up + state and current node is in the pop-up showing state and + current node is not in the manual + state
: +Let current element plus one be pop-up position's value for + current node plus 1.
If current element plus one is greater than upper bound, then set + upper bound to current element plus one.
Let target pop-up be current node's pop-up target + element.
If target pop-up is not null and target pop-up is in the pop-up + showing state and target pop-up is not in the manual state:
+Let target pop-up plus one be pop-up position's value for + target pop-up plus 1.
If target pop-up plus one is greater than upper bound, then set + upper bound to target pop-up plus one.
Set current node to the parent node of current node within the + flat tree.
Let seen be an empty set.
Return the result of running the nearest open ancestral pop-up recursive + algorithm with node, pop-up positions, anchors to pop-ups, + upper bound, and seen.
The nearest open ancestral pop-up
+ recursive algorithm, given a Node
node, a map
+ pop-up positions, a map anchors to pop-ups, an integer upper bound,
+ and a set seen, is as follows:
If node is null, return null.
If seen contains node, return null.
Add node to seen.
Let ancestor be null.
Let position be -1.
Let update be to run the following steps on pop-up:
+If pop-up is not null and pop-up is not in the pop-up showing + state and pop-up is not is not in the manual state:
+Let new position be pop-up position's value for + pop-up.
If new position is greater than position and new position + is less than upper bound:
+Set ancestor to pop-up.
Set position to new position.
Let recurse and update be to run the following steps on node:
+Let nearest open ancestor be the result of running nearest open ancestral pop-up recursive
with
+ node, pop-up positions, anchors to pop-ups, upper bound,
+ and seen.
Run update with pop-up set to nearest open ancestor.
Run update with node.
If pop-up positions has a value for node:
+Run recurse and update with node's pop-up anchor element.
Run recurse and update with node's pop-up + invoker.
If node has a pop-up target element, then run + recurse and update with node's pop-up target element.
If node has a hover pop-up + element, then run recurse and update with node's hover pop-up element.
If anchors to pop-ups has a value for node, then run + recurse and update with anchors to pop-ups's value for node.
Run recurse and update on node's parent node in the flat + tree.
Return ancestor.
To get the pop-up anchor element of an
+ Element
element, run these steps:
If element is in the no pop-up state, + then return null.
Let anchor attribute be the result of running getAttribute
on element with qualifiedName set
+ to 'anchor'.
If anchor attribute is null, then return null.
Return the result of running getElementById
on element's
+ root with elementId set to anchor attribute.
The topmost pop-up auto or hint algorithm given a Document
+ document is as follows:
If document's pop-up hint showing is not null, then return + document's pop-up hint showing.
If document's pop-up stack is not empty, then return + document's pop-up stack's last element.
Return null.
The pop-up focusing steps for an Element
subject are as
+ follows:
Let control be the result of running pop-up focusable area on + subject with autofocus only set to true.
Run the focusing steps for control.
Let top document be the active document of control's + node document's browsing context's + top-level browsing context.
If control's node document's origin is not the same + as the origin of top document, then + return.
Empty top document's + autofocus candidates.
Set top document's autofocus processed flag to true.
The pop-up focusable area given an element subject and boolean + autofocus only is as follows:
+If subject has the autofocus
attribute,
+ then return subject.
For each node in the flat tree within subject:
+If node is a dialog
element or node is not in the
+ no pop-up state, then continue without traversing
+ into the child nodes of node.
If node is not focusable, continue.
If autofocus only is true and node does not have the autofocus
attribute, continue.
Return node.
Return null.
To get the hover pop-up element of an Element
element, run
+ these steps:
Let hover attribute be the result of running getAttribute
on element with qualifiedName
+ set to popuphovertarget
.
If hover attribute is null, then return null.
Let popup element be the result of running getElementById
on element's
+ root with elementId set to hover attribute.
If popup element is null or popup element is in the no pop-up state, then return null.
Return popup element.
The is node pop-up descendant algorithm, given an Element
+ element and a Node
potential descendant, is as follows:
If element is in the manual pop-up + state:
+For each inclusive ancestor of potential descendant up the flat + tree:
+If ancestor is element, return true.
Otherwise:
+Let ancestor be the result of running nearest open ancestral + pop-up on potential ancestor with inclusive set to true.
While ancestor is not null:
+If ancestor is element, return true.
Set ancestor to the result of running nearest open ancestral + pop-up on ancestor.
Return false.
All Element
s may have the following content attributes, known as the
+ pop-up target attributes:
popUpToggleTarget
popUpHideTarget
popUpShowTarget
The pop-up target attributes are only supported on the following elements:
+button
elements
input
elements in the button
+ state.
input
elements in the submit button
+ state.
input
elements in the image button
+ state.
input
elements in the reset button
+ state.
The pop-up target attribute activation behavior algorithm given a Node
+ node is as follows:
If node has the disabled
attribute, then
+ return.
If node is not supported by the pop-up target + attributes, then return.
Let pop-up be node's pop-up target element.
If pop-up is null, then return.
If node doesn't have the popuptoggletarget
attribute:
If node has the popupshowtarget
+ attribute and pop-up is in the pop-up showing state, then return.
If node has the popuphidetarget
+ attribute and pop-up is in the pop-up hidden state, then return.
If node doesn't have the popupshowtarget
attribute and node doesn't
+ have the popuphidetarget
attribute, then
+ return.
If node has a form owner and node is in any of the + following states, then return:
+node is a button
element in the submit state.
node is an input
element in the submit state.
node is an input
element in the image state.
If pop-up is in the pop-up showing state, then run the hide + pop-up algorithm with element set to pop-up, focus previous element set to + true, and hide immediately set to false.
Otherwise, run the following steps:
+Set pop-up's pop-up invoker to node.
Run showPopUp on pop-up.
The pop-up target element algorithm given a Node
node is as
+ follows:
If node is not supported, then return null.
Let idref be null.
If node has the popuptoggletarget
attribute, then set idref
+ to the value of node's popuptoggletarget
attribute.
Otherwise, if node has the popupshowtarget
attribute, then set idref to
+ the value of node's popupshowtarget
+ attribute.
Otherwise, if node has the popuphidetarget
attribute, then set idref to
+ the value of node's popuphidetarget
+ attribute.
If idref is null, then return null.
Let popup element be the result of running getElementById on node's root + with idref.
If popup element is null, then return null.
If popup element is in the no pop-up + state, then return null.
Return popup element.
Clicking outside of a hint pop-up or an auto pop-up will close the pop-up.
+When a Document
document receives an Event
+ event in the capture phase, run the following steps:
Let topmost popup be the result of running topmost pop-up auto or + hint on document.
If topmost popup is null, then return.
Let target be event's target.
If target is null, then return.
If event is a mousedown
event then:
Set document's pop-up mousedown target to the result of running + nearest open ancestral pop-up with node set to target and inclusive set + to true.
If event is a mouseup
event then:
Let ancestor be the result of running nearest open ancestral + pop-up with node set to target and inclusive set to true.
Let same target be true if ancestor is document's + pop-up mousedown target.
Set document's pop-up mousedown target to null.
If same target is true, then run hide + all pop-ups until with endpoint set to ancestor, focus previous element set + to false, hide immediately set to false, and hide unrelated set to true.
If event is a keydown
event for the
+ Escape key:
Run the hide pop-up algorithm with element set to topmost popup, + focus previous element set to true, and hide immediately set to false.
If event is a focusin
event, then:
Let ancestor be the result of running nearest open ancestral + pop-up with node set to target and inclusive set to true.
Run hide + all pop-ups until with endpoint set to ancestor, focus previous element set + to false, hide immediately set to false, and hide unrelated set to true.
defaultopen
attributeAll Element
s may have the defaultopen
content attribute set. defaultopen
is a boolean attribute.
When any Element
element is inserted by the parser, run the following steps:
If element has the defaultopen
attribute
+ set:
Queue a global task on the user interaction task source given + element's relevant global object to run the following steps:
+If element is not connected, return.
If element is in the no pop-up + state, return.
If element is in the hint + state, return.
This ensures that only the first popup=auto element with defaultopen is shown.
+If element is in the auto state + and element's node document's pop-up stack is not empty, + return.
Run showPopUp on element.
popuphovertarget
attributeAll Element
s may have the popuphovertarget
content attribute.
When an Element
element becomes hovered, run the following steps:
For each ancestor pop-up in element's node document's + all open pop-ups:
+If ancestor pop-up is node pop-up descendant of + element, then run maybe queue pop-up hide event on ancestor + pop-up.
If ancestor pop-up is node pop-up descendant of + element:
+Let task be ancestor pop-up's pop-up hover hide + task.
If task is not null:
+Cancel + task.
Set ancestor pop-up's pop-up hover hide task to + null.
Let popup element be the result of running pop-up hover target + element on element.
If popup element is null, return.
Let hover tasks be popup element's pop-up hover show + tasks.
Let hover delay be element's computed value for + 'pop-up-show-delay' multiplied by 1000.
If hover delay is not a valid floating-point number, + return.
Set hover tasks's value for element to the result of queueing a delayed cancelable task with source + set to the DOM manipulation task source, element set to popup element, + milliseconds set to hover delay, and steps set to the following steps:
+Set hover tasks's value for element to null.
If popup element is in the no pop-up + state, return.
If popup element is not connected, return.
If popup element is in the pop-up showing state, return.
If element's pop-up hover target element is not + popup element, return.
Set popup element's pop-up invoker to element.
Run showPopUp
on popup element.
When an Element
element becomes no longer hovered, run the following steps:
For each ancestor pop-up in element's node document's + all open pop-ups:
+If ancestor pop-up is node pop-up descendant of + element, then run maybe queue pop-up hide event on ancestor + pop-up.
Let popup element be the result of running pop-up hover target element + on element.
If popup element is null, return.
Let hover tasks be popup element's pop-up hover show + tasks.
Let hover task handle be hover tasks's value for + element.
If hover task handle is null, return.
Run cancel a delayed cancelable task with timerKey set to hover task + handle global set to element's relevant global object.
Set hover tasks's value for element to null.
The pop-up hover target element for an Element
element is the
+ result of the following steps:
If element is in the no pop-up + state, then return null.
Let hover attribute be the result of running getAttribute
on element with qualifiedName
+ set to popuphovertarget
.
If hover attribute is null, then return null.
Return the result of running getElementById
on element's
+ root with elementId set to hover attribute.
The maybe queue pop-up hide event algorithm, given an Element
+ element, is as follows:
If element is in the pop-up hidden state, return.
Let hover delay be element's computed value for + 'pop-up-hide-delay' multiplied by 1000.
If hover delay is not a valid floating-point number, + return.
Set element's pop-up hover hide task to the result of queueing a delayed cancelable task with source + set to the DOM manipulation task source, element set to popup element, + milliseconds set to hover delay, and steps set to the following steps:
+Let show task be element's pop-up hover show tasks's + value for element.
If show task is not null:
+Cancel show + task.
Set element's pop-up hover show tasks's value for + element to null.
If element is in the pop-up showing state, then run the + hide pop-up algorithm with element set to element, focus previous + element set to true, and hide imediately set to false.
To queue a delayed cancelable task on a task source
+ source, which performs a series of steps steps, given an
+ Element
element and an integer milliseconds:
Run the following steps after a timeout + with global set to element's relevant global object and milliseconds set + to milliseconds:
+Queue a task with task source set to source, steps set to + steps, and document set to element's node document.
Let timerKey be the timerKey generated in the previous call to run steps + after a timeout.
Return timerKey.
To cancel a delayed cancelable task given a timerKey timerKey and + a global global:
+Remove timerKey from global's map of active + timers.
It is possible for a microtask to be moved to a regular task
queue, if, during its initial execution, it spins the
event loop. This is the only case in which the OnBeforeUnloadEventHandlerNonNull? OnBeforeUnl
The following rules are also expected to apply, as presentational hints: Elements in the pop-up hidden state are expected to have their
+ 'display' property set to 'none'. To implement a custom context menu, use script to handle the onemptied
emptied
onended
ended
onformdata
formdata
+ onhide
hide
oninput
input
oninvalid
invalid
onkeydown
keydown
@@ -97516,6 +98783,7 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnl
onseeked
seeked
onseeking
seeking
onselect
select
+ onshow
show
onslotchange
slotchange
onstalled
stalled
onsubmit
submit
@@ -117959,6 +119227,38 @@ dialog::backdrop {
slot {
display: contents;
+}
+
+[popup="" i],
+[popup=auto i],
+[popup=hint i],
+[popup=manual i] {
+ position: fixed;
+ inset-inline-start: 0;
+ inset-inline-end: 0;
+ inset-block-start: 0;
+ inset-block-end: 0;
+ width: fit-content;
+ height: fit-content;
+ margin: auto;
+ border: solid;
+ overflow: auto;
+ padding: 1em;
+ color: CanvasText;
+ background-color: Canvas;
+}
+
+[popup="" i]::backdrop,
+[popup=auto i]::backdrop,
+[popup=hint i]::backdrop,
+[popup=manual i]::backdrop {
+ position: fixed;
+ inset-inline-start: 0;
+ inset-inline-end: 0;
+ inset-block-start: 0;
+ inset-block-end: 0;
+ background: transparent;
+ pointer-events: none !important;
}
Phrasing content
@namespace url(http://www.w3.org/1999/xhtml);
@@ -121035,7 +122338,6 @@ if (s = prompt('What is your name?')) {
label
on menu
elementscontextmenu
on all elementsonshow
on all elementscontextmenu
event. hashchange
event handler for Window
object
Event handler content attribute
+
+ onhide
+ HTML elements
+ hide
event handler
+ Event handler content attribute
+
oninput
HTML elements
@@ -126386,6 +127694,12 @@ interface External {
select
event handler
Event handler content attribute
+
+ onshow
+ HTML elements
+ show
event handler
+ Event handler content attribute
+
onslotchange
HTML elements
@@ -127049,6 +128363,12 @@ INSERT INTERFACES HERE
Global scope objects, Worker
objects, elements, networking-related objects
Fired when unexpected errors occur (e.g. networking errors, script errors, decoding errors)
+
+ finish
+ Event
+ Animation
+ Fired on an animation when it completes
+
focus
Event
@@ -127067,6 +128387,12 @@ INSERT INTERFACES HERE
Window
Fired at the Window
when the fragment part of the document's URL changes
+
+ hide
+ Event
+ Elements
+ Fired on a pop-up when it is hidden.
+
input
Event
@@ -127176,6 +128502,12 @@ INSERT INTERFACES HERE
Form controls
Fired at form controls when their text selection is adjusted (whether by an API or by the user)
+
+ show
+ Event
+ Elements
+ Fired on a pop-up when it is shown.
+
slotchange
Event