HTML Standard
User interaction
6.1
The
hidden
attribute
6.2
Page visibility
6.2.1
The
VisibilityStateEntry
interface
6.3
Inert subtrees
6.3.1
Modal dialogs and inert subtrees
6.3.2
The
inert
attribute
6.4
Tracking user activation
6.4.1
Data model
6.4.2
Processing model
6.4.3
APIs gated by user activation
6.4.4
The
UserActivation
interface
6.4.5
User agent automation
6.5
Activation behavior of elements
6.5.1
The
ToggleEvent
interface
6.6
Focus
6.6.1
Introduction
6.6.2
Data model
6.6.3
The
tabindex
attribute
6.6.4
Processing model
6.6.5
Sequential focus navigation
6.6.6
Focus management APIs
6.6.7
The
autofocus
attribute
6.7
Assigning keyboard shortcuts
6.7.1
Introduction
6.7.2
The
accesskey
attribute
6.7.3
Processing
model
6.8
Editing
6.8.1
Making document regions editable: The
contenteditable
content attribute
6.8.2
Making entire documents
editable: the
designMode
getter and setter
6.8.3
Best practices for in-page editors
6.8.4
Editing APIs
6.8.5
Spelling and grammar checking
6.8.6
Autocapitalization
6.8.7
Input modalities: the
inputmode
attribute
6.8.8
Input modalities: the
enterkeyhint
attribute
6.9
Find-in-page
6.9.1
Introduction
6.9.2
Interaction with
details
and
hidden=until-found
6.9.3
Interaction with selection
6.10
Close requests and close watchers
6.10.1
Close requests
6.10.2
Close watcher infrastructure
6.10.3
The
CloseWatcher
interface
User interaction
6.1
The
hidden
attribute
Global_attributes/hidden
Support in one engine only.
Firefox
No
Safari
No
Chrome
102+
Opera
No
Edge
102+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
Global_attributes/hidden
Support in all current engines.
Firefox
4+
Safari
5.1+
Chrome
10+
Opera
Edge
79+
Edge (Legacy)
12+
Internet Explorer
11
Firefox Android
Safari iOS
Chrome Android
WebView Android
4+
Samsung Internet
Opera Android
All
HTML elements
may have the
hidden
content attribute set. The
hidden
attribute is an
enumerated attribute
with the
following keywords and states:
Keyword
State
Brief description
hidden
hidden
Will not be rendered.
(the empty string)
until-found
hidden until found
Will not be rendered, but content inside will be accessible to
find-in-page
and
fragment navigation
The attribute's
missing value default
is the
not hidden
state, and its
invalid value default
is the
hidden
state.
When an element has the
hidden
attribute in the
hidden
state, it indicates that the element is not yet, or
is no longer, directly relevant to the page's current state, or that it is being used to declare
content to be reused by other parts of the page as opposed to being directly accessed by the user.
User agents should not render elements that are in the
hidden
state. This requirement may be implemented
indirectly through the style layer. For example, a web browser could implement these requirements
using the rules suggested in the Rendering section
When an element has the
hidden
attribute in the
hidden until found
state, it indicates that the
element is hidden like the
hidden
state but the
content inside the element will be accessible to
find-in-page
and
fragment navigation
. When these features attempt to scroll to a
target which is in the element's subtree, the user agent will remove the
hidden
attribute in order to reveal the content before scrolling to
it. In addition to removing the
hidden
attribute, an event named
beforematch
is also fired on the element before the
hidden
attribute is removed.
Web browsers will use 'content-visibility: hidden' instead of 'display: none' when the
hidden
attribute is in the
hidden until found
state, as specified in the
Rendering section
Because this attribute is typically implemented using CSS, it's also possible to override it
using CSS. For instance, a rule that applies 'display: block' to all elements will cancel the
effects of the
hidden
state. Authors therefore
have to take care when writing their style sheets to make sure that the attribute is still styled
as expected. In addition, legacy user agents which don't support the
hidden until found
state will have 'display: none'
instead of 'content-visibility: hidden', so authors are encouraged to make sure that their style
sheets don't change the 'display' or 'content-visibility' properties of
hidden until found
elements.
Since elements with the
hidden
attribute in the
hidden until found
state use 'content-visibility:
hidden' instead of 'display: none', there are two caveats of the
hidden until found
state that make it different
from the
hidden
state:
The element needs to be affected by
layout containment
in order to be
revealed by find-in-page. This means that if the element in the
hidden until found
state has a 'display' value of
'none', 'contents', or 'inline', then the element will not be revealed by find-in-page.
The element will still have a
generated box
when in
the
hidden until found
state, which means
that borders, margin, and padding will still be rendered around the element.
In the following skeletal example, the attribute is used to hide the web game's main screen
until the user logs in:
The Example Game
Login
...
The
hidden
attribute must not be used to hide content that
could legitimately be shown in another presentation. For example, it is incorrect to use
hidden
to hide panels in a tabbed dialog, because the tabbed interface
is merely a kind of overflow presentation — one could equally well just show all the form
controls in one big page with a scrollbar. It is similarly incorrect to use this attribute to hide
content just from one presentation — if something is marked
hidden
, it is hidden from all presentations, including, for instance,
screen readers.
Elements that are not themselves
hidden
must not
hyperlink
to elements that are
hidden
. The
for
attributes of
label
and
output
elements that are not
themselves
hidden
must similarly not refer to elements that are
hidden
. In both cases, such references would cause user
confusion.
Elements and scripts may, however, refer to elements that are
hidden
in other contexts.
For example, it would be incorrect to use the
href
attribute to link to a section marked with the
hidden
attribute.
If the content is not applicable or relevant, then there is no reason to link to it.
It would be fine, however, to use the ARIA
aria-describedby
attribute to refer to descriptions that are
themselves
hidden
. While hiding the descriptions implies that
they are not useful alone, they could be written in such a way that they are useful in the
specific context of being referenced from the elements that they describe.
Similarly, a
canvas
element with the
hidden
attribute could be used by a scripted graphics engine as an off-screen buffer, and a form control
could refer to a hidden
form
element using its
form
attribute.
Elements in a section hidden by the
hidden
attribute are still
active, e.g. scripts and form controls in such sections still execute and submit respectively.
Only their presentation to the user changes.
HTMLElement/hidden
Support in all current engines.
Firefox
4+
Safari
5.1+
Chrome
6+
Opera
11.6+
Edge
79+
Edge (Legacy)
12+
Internet Explorer
11
Firefox Android
Safari iOS
Chrome Android
WebView Android
3+
Samsung Internet
Opera Android
12+
The
hidden
getter steps
are:
If the
hidden
attribute is in the
hidden until found
state, then return "
until-found
".
If the
hidden
attribute is set, then return
true.
Return false.
The
hidden
setter steps are:
If the given value is a string that is an
ASCII case-insensitive
match for
until-found
", then set the
hidden
attribute to "
until-found
".
Otherwise, if the given value is false, then remove the
hidden
attribute.
Otherwise, if the given value is the empty string, then remove the
hidden
attribute.
Otherwise, if the given value is null, then remove the
hidden
attribute.
Otherwise, if the given value is 0, then remove the
hidden
attribute.
Otherwise, if the given value is NaN, then remove the
hidden
attribute.
Otherwise, set the
hidden
attribute to the empty
string.
The
ancestor hidden-until-found revealing algorithm
is to run the following steps on
currentNode
While
currentNode
has a parent node within the
flat tree
If
currentNode
has the
hidden
attribute in the
hidden until found
state, then:
Fire an event
named
beforematch
at
currentNode
Remove the
hidden
attribute from
currentNode
Set
currentNode
to the parent node of
currentNode
within the
flat tree
6.2
Page visibility
traversable navigable
's
system visibility state
, including its
initial value upon creation, is determined by the user agent. It represents, for example, whether
the browser window is minimized, a browser tab is currently in the background, or a system
element such as a task switcher obscures the page.
When a user-agent determines that the
system visibility state
for
traversable navigable
traversable
has changed to
newState
, it
must run the following steps:
Let
navigables
be the
inclusive descendant navigables
of
traversable
's
active document
For each
navigable
of
navigables
in what order?
Let
document
be
navigable
's
active
document
Queue a global task
on the
user interaction task source
given
document
's
relevant global object
to
update the visibility
state
of
document
with
newState
Document
has a
visibility state
, which is
either "
hidden
" or "
visible
", initially set to
hidden
".
Document/visibilityState
Support in all current engines.
Firefox
18+
Safari
7+
Chrome
33+
Opera
20+
Edge
79+
Edge (Legacy)
12+
Internet Explorer
10+
Firefox Android
Safari iOS
Chrome Android
WebView Android
4.4.3+
Samsung Internet
Opera Android
20+
The
visibilityState
getter steps are to return
this
's
visibility state
Document/hidden
Support in all current engines.
Firefox
18+
Safari
7+
Chrome
33+
Opera
12.1+
Edge
79+
Edge (Legacy)
12+
Internet Explorer
10+
Firefox Android
Safari iOS
Chrome Android
WebView Android
4.4.3+
Samsung Internet
Opera Android
12.1+
The
hidden
getter
steps are to return true if
this
's
visibility state
is
hidden
", otherwise false.
To
update the visibility state
of
Document
document
to
visibilityState
If
document
's
visibility state
equals
visibilityState
then return.
Set
document
's
visibility state
to
visibilityState
Queue
a new
VisibilityStateEntry
whose
visibility state
is
visibilityState
and whose
timestamp
is
the
current high resolution time
given
document
's
relevant global object
Run the
screen orientation change steps
with
document
[SCREENORIENTATION]
Run any
page visibility change steps
which may be defined in other
specifications, with
visibility state
and
document
It would be better if specification authors sent a pull request to add calls
from here into their specifications directly, instead of using the
page visibility change
steps
hook, to ensure well-defined cross-specification call order. As of the time of
this writing the following specifications are known to have
page visibility change
steps
, which will be run in an unspecified order:
Device Posture API
and
Web NFC
[DEVICEPOSTURE]
[WEBNFC]
Fire an event named
visibilitychange
at
document
, with its
bubbles
attribute
initialized to true.
6.2.1
The
VisibilityStateEntry
interface
VisibilityStateEntry
Support in one engine only.
Firefox
No
Safari
No
Chrome
115+
Opera
Edge
115+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
The
VisibilityStateEntry
interface exposes visibility changes to the document,
from the moment the document becomes active.
For example, this allows JavaScript code in the page to examine correlation
between visibility changes and paint timing:
function wasHiddenBeforeFirstContentfulPaint() {
const fcpEntry = performance.getEntriesByName("first-contentful-paint")[0];
const visibilityStateEntries = performance.getEntriesByType("visibility-state");
return visibilityStateEntries.some(e =>
e.startTime < fcpEntry.startTime &&
e.name === "hidden");
Since hiding a page can cause throttling of rendering and other user-agent
operations, it is common to use visibility changes as an indication that such throttling has
occurred. However, other things could also cause throttling in different browsers, such as
long periods of inactivity.
[Exposed=(Window)]
interface
VisibilityStateEntry
PerformanceEntry
readonly attribute DOMString
name
; // shadows inherited
name
readonly attribute DOMString
entryType
; // shadows inherited
entryType
readonly attribute DOMHighResTimeStamp
startTime
; // shadows inherited
startTime
readonly attribute unsigned long
duration
; // shadows inherited
duration
};
The
VisibilityStateEntry
has an associated
DOMHighResTimeStamp
timestamp
The
VisibilityStateEntry
has an associated "
visible
" or
hidden
visibility state
The
name
getter steps are to return
this
's
visibility state
The
entryType
getter steps are to return
visibility-state
".
The
startTime
getter steps are to return
this
's
timestamp
The
duration
getter steps are to return
zero.
6.3
Inert subtrees
See also
inert
for an explanation of the
attribute of the same name.
A node (in particular elements and text nodes) can be
inert
. When a node is
inert
Hit-testing must act as if the
'pointer-events'
CSS property were set to
'none'.
Text selection functionality must act as if the
'user-select'
CSS property
were set to 'none'.
If it is
editable
, the node behaves as if it were non-editable.
The user agent should ignore the node for the purposes of
find-in-page
Inert nodes generally cannot be focused, and user agents do not expose the inert
nodes to accessibility APIs or assistive technologies. Inert nodes that are
commands
will become inoperable to users, in the manner described
above.
User agents may allow the user to override the restrictions on
find-in-page
and
text selection, however.
By default, a node is not
inert
6.3.1
Modal dialogs and inert subtrees
Document
document
is
blocked by a modal dialog
subject
if
subject
is the topmost
dialog
element in
document
's
top layer
. While
document
is so blocked, every node
that is
connected
to
document
, with the exception of the
subject
element and its
flat tree
descendants, must become
inert
subject
can additionally become
inert
via the
inert
attribute, but only if specified on
subject
itself
(i.e.,
subject
escapes inertness of ancestors);
subject
's
flat
tree
descendants can become
inert
in a similar fashion.
The
dialog
element's
showModal()
method causes this mechanism to trigger, by
adding
the
dialog
element to its
node document
's
top layer
6.3.2
The
inert
attribute
Global_attributes/inert
Support in all current engines.
Firefox
112+
Safari
15.5+
Chrome
102+
Opera
Edge
102+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
The
inert
attribute is a
boolean attribute
that
indicates, by its presence, that the element and all its
flat tree
descendants which
don't otherwise escape inertness (such as modal dialogs) are to be made
inert
by the
user agent.
An inert subtree should not contain any content or controls which are critical to
understanding or using aspects of the page which are not in the inert state. Content in an inert
subtree will not be perceivable by all users, or interactive. Authors should not specify elements
as inert unless the content they represent are also visually obscured in some way. In most cases,
authors should not specify the
inert
attribute on individual form controls. In these
instances, the
disabled
attribute is probably more
appropriate.
The following example shows how to mark partially loaded content, visually obscured by a
"loading" message, as inert.
Population by City
Loading...
| City | State | 20-- Population | 20-- Population | Percentage change |
|---|
The "loading" overlay obscures the inert content, making it visually apparent that the inert
content is not presently accessible. Notice that the heading and "loading" text are not
descendants of the element with the
inert
attribute. This will ensure this text is
accessible to all users, while the inert content cannot be interacted with by anyone.
By default, there is no persistent visual indication of an element or its subtree being
inert. Appropriate visual styles for such content is often context-dependent. For instance, an
inert off-screen navigation panel would not require a default style, as its off-screen position
visually obscures the content. Similarly, a modal
dialog
element's backdrop will
serve as the means to visually obscure the inert content of the web page, rather than styling
the inert content specifically.
However, for many other situations authors are strongly encouraged to clearly mark what parts
of their document are active and which are inert, to avoid user confusion. In particular, it is
worth remembering that not all users can see all parts of a page at once; for example, users of
screen readers, users on small devices or with magnifiers, and even users using particularly
small windows might not be able to see the active part of a page and might get frustrated if
inert sections are not obviously inert.
HTMLElement/inert
Support in all current engines.
Firefox
112+
Safari
15.5+
Chrome
102+
Opera
Edge
102+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
The
inert
IDL attribute must
reflect
the content attribute of the same name.
6.4
Tracking
user activation
To prevent abuse of certain APIs that could be annoying to users (e.g., opening popups or
vibrating phones), user agents allow these APIs only when the user is actively interacting with
the web page or has interacted with the page at least once. This "active interaction" state is
maintained through the mechanisms defined in this section.
6.4.1
Data model
For the purpose of tracking user activation, each
Window
has two
relevant values:
last activation timestamp
, which is either a
DOMHighResTimeStamp
, positive infinity (indicating that
has never been
activated), or negative infinity (indicating that the activation has been
consumed
). Initially positive infinity.
last history-action activation timestamp
, which is either a
DOMHighResTimeStamp
or positive infinity, initially positive infinity.
A user agent also defines a
transient activation duration
, which is a constant
number indicating how long a user activation is available for certain
user activation-gated APIs
(e.g., for opening popups).
The
transient activation duration
is expected be at most a few
seconds, so that the user can possibly perceive the link between an interaction with the page and
the page calling the activation-gated API.
We then have the following boolean user activation states for
Sticky activation
When the
current high resolution time
given
is greater than or
equal to the
last activation timestamp
in
is said to
have
sticky activation
This is
's historical activation state, indicating whether the user has ever
interacted in
. It starts false, then changes to true (and never changes back to
false) when
gets the very first
activation notification
Transient activation
When the
current high resolution time
given
is greater than or
equal to the
last activation timestamp
in
, and less than the
last activation timestamp
in
plus the
transient activation
duration
, then
is said to have
transient activation
This is
's current activation state, indicating whether the user has interacted
in
recently. This starts with a false value, and remains true for a limited time
after every
activation notification
gets.
The
transient activation
state is considered
expired
if it becomes false because the
transient
activation duration
time has elapsed since the last user activation. Note that it can
become false even before the expiry time through an
activation consumption
History-action activation
When the
last history-action activation timestamp
of
is not equal
to the
last activation timestamp
of
, then
is said to have
history-action activation
This is a special variant of user activation, used to allow access to certain session history
APIs which, if used too frequently, would make it harder for the user to traverse back using
browser UI
. It starts with a false value, and becomes true whenever
the user interacts with
, but is reset to false through
history-action activation consumption
. This ensures such
APIs cannot be used multiple times in a row without an intervening user activation. But unlike
transient activation
, there is no time limit within which such APIs must be
used.
The
last activation timestamp
and
last history-action
activation timestamp
are retained even after the
Document
changes its
fully active
status (e.g., after navigating away from a
Document
, or
navigating to a cached
Document
). This means
sticky activation
state
spans multiple navigations as long as the same
Document
gets reused. For the
transient activation state, the original
expiry
time
remains unchanged (i.e., the state still expires within the
transient activation
duration
limit from the original
activation triggering input event
). It is
important to consider this when deciding whether to base certain things off
sticky
activation
or
transient activation
6.4.2
Processing model
When a user interaction causes firing of an
activation triggering input
event
in a
Document
document
, the user agent must perform the
following
activation notification
steps
before
dispatching
the event:
Assert
document
is
fully active
Let
windows
be «
document
's
relevant global object
».
Extend
windows
with the
active window
of each of
document
's
ancestor
navigables
Extend
windows
with the
active window
of each of
document
's
descendant
navigables
, filtered to include only those
navigables
whose
active document
's
origin
is
same origin
with
document
's
origin
For each
window
in
windows
Set
window
's
last activation timestamp
to the
current
high resolution time
Notify the close watcher manager about user activation
given
window
An
activation triggering input event
is any event whose
isTrusted
attribute is true and whose
type
is one of:
keydown
", provided the key is neither the
Esc
key nor a shortcut key reserved by the user agent;
mousedown
";
pointerdown
", provided the event's
pointerType
is "
mouse
";
pointerup
", provided the event's
pointerType
is not "
mouse
"; or
touchend
".
Activation consuming APIs
defined in this and
other specifications can
consume user activation
by performing the following
steps, given a
Window
If
's
navigable
is null, then
return.
Let
top
be
's
navigable
's
top-level traversable
Let
navigables
be the
inclusive descendant navigables
of
top
's
active document
Let
windows
be the list of
Window
objects constructed by taking
the
active window
of each item in
navigables
For each
window
in
windows
, if
window
's
last activation timestamp
is not positive infinity, then set
window
's
last activation timestamp
to negative infinity.
History-action activation-consuming
APIs
can
consume history-action user activation
by performing the following
steps, given a
Window
If
's
navigable
is null, then
return.
Let
top
be
's
navigable
's
top-level traversable
Let
navigables
be the
inclusive descendant navigables
of
top
's
active document
Let
windows
be the list of
Window
objects constructed by taking
the
active window
of each item in
navigables
For each
window
in
windows
, set
window
's
last history-action activation timestamp
to
window
's
last activation timestamp
Note the asymmetry in the sets of
browsing
contexts
in the page that are affected by an
activation notification
vs an
activation consumption
: an activation consumption
changes (to false) the
transient activation
states for all browsing contexts in the
page, but an activation notification changes (to true) the states for a subset of those browsing
contexts. The exhaustive nature of consumption here is deliberate: it prevents malicious sites
from making multiple calls to an
activation consuming API
from a single user
activation (possibly by exploiting a deep hierarchy of
iframe
s).
6.4.3
APIs gated by user activation
APIs that are dependent on user activation are classified into different levels:
Sticky activation-gated APIs
These APIs require the
sticky activation
state to be true, so they are
blocked until the very first user activation.
Transient activation-gated APIs
These APIs require the
transient
activation
state to be true, but they don't
consume
it, so multiple calls are allowed per user activation until the
transient state
expires
Transient activation-consuming APIs
These APIs require the
transient activation
state to be true, and they
consume user activation
in each call to prevent multiple calls per user
activation.
History-action activation-consuming APIs
These APIs require the
history-action activation
state to be true, and they
consume history-action user activation
in each call to prevent multiple calls per
user activation.
6.4.4
The
UserActivation
interface
UserActivation
Firefox
No
Safari
16.4+
Chrome
72+
Opera
Edge
79+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
Each
Window
has an
associated
UserActivation
, which is a
UserActivation
object. Upon creation of the
Window
object, its
associated
UserActivation
must be set to a
new
UserActivation
object created in the
Window
object's
relevant realm
[Exposed=Window]
interface
UserActivation
readonly attribute boolean
hasBeenActive
readonly attribute boolean
isActive
};
partial interface
Navigator
[SameObject] readonly attribute
UserActivation
userActivation
};
navigator
userActivation
hasBeenActive
Returns whether the window has
sticky activation
navigator
userActivation
isActive
Returns whether the window has
transient activation
Navigator/userActivation
Firefox
No
Safari
16.4+
Chrome
72+
Opera
Edge
79+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
The
userActivation
getter steps are to return
this
's
relevant global object
's
associated
UserActivation
UserActivation/hasBeenActive
Firefox
No
Safari
16.4+
Chrome
72+
Opera
Edge
79+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
The
hasBeenActive
getter steps are to return
true if
this
's
relevant global object
has
sticky
activation
, and false otherwise.
UserActivation/hasBeenActive
Firefox
No
Safari
16.4+
Chrome
72+
Opera
Edge
79+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
The
isActive
getter steps are to return true if
this
's
relevant global object
has
transient activation
and false otherwise.
6.4.5
User agent automation
For the purposes of user-agent automation and application testing, this specification defines
the following
extension command
for the
Web Driver
specification. It is
optional for a user agent to support the following
extension command
[WEBDRIVER]
HTTP Method
URI Template
POST
/session/{
session id
}/window/consume-user-activation
The
remote end steps
are:
Let
window
be
current
browsing context
's
active window
Let
consume
be true if
window
has
transient activation
otherwise false.
If
consume
is true, then
consume user activation
of
window
Return
success
with data
consume
6.5
Activation behavior of elements
Certain elements in HTML have an
activation behavior
, which means that the user
can activate them. This is always caused by a
click
event.
The user agent should allow the user to manually trigger elements that have an
activation
behavior
, for instance using keyboard or voice input, or through mouse clicks. When the
user triggers an element with a defined
activation behavior
in a manner other than
clicking it, the default action of the interaction event must be to
fire a
click
event
at the element.
element
click
()
HTMLElement/click
Support in all current engines.
Firefox
3+
Safari
6+
Chrome
9+
Opera
10.5+
Edge
79+
Edge (Legacy)
12+
Internet Explorer
5.5+
Firefox Android
4+
Safari iOS
Chrome Android
WebView Android
4.4+
Samsung Internet
1.0+
Opera Android
11+
Acts as if the element was clicked.
Each element has an associated
click in progress flag
, which is initially unset.
The
click()
method must run
the following steps:
If this element is a form control that is
disabled
, then return.
If this element's
click in progress flag
is set, then return.
Set this element's
click in progress flag
Fire a synthetic pointer event
named
click
at this element, with the
not trusted flag
set.
Unset this element's
click in progress flag
6.5.1
The
ToggleEvent
interface
ToggleEvent/ToggleEvent
Support in all current engines.
Firefox
🔰 114+
Safari
17+
Chrome
114+
Opera
Edge
114+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
ToggleEvent
Support in all current engines.
Firefox
🔰 114+
Safari
17+
Chrome
114+
Opera
Edge
114+
Edge (Legacy)
Internet Explorer
No
Firefox Android
Safari iOS
Chrome Android
WebView Android
Samsung Internet
Opera Android
[Exposed=Window]
interface
ToggleEvent
Event
constructor(DOMString type, optional
ToggleEventInit
eventInitDict = {});
readonly attribute DOMString oldState;
readonly attribute DOMString newState;
};

