A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/CommandEvent/CommandEvent below:

CommandEvent: CommandEvent() constructor - Web APIs

CommandEvent: CommandEvent() constructor

Limited availability

The CommandEvent() constructor creates a new CommandEvent object.

Syntax
new CommandEvent(type)
new CommandEvent(type, options)
Parameters
type

A string with the name of the event. It is case-sensitive and browsers set it to beforeinput or input.

options Optional

An object that, in addition of the properties defined in Event(), can have the following properties:

source Optional

An HTMLButtonElement representing the button that was interacted with to cause this event. This can be any element but we recommend only using button as a source to avoid surprises.

command Optional

A string containing the command for the controlled element to take. While manually instantiating a CommandEvent it is possible to use any string value, but it is recommended to use one of the built-in names or prefix with two dashes (--) to ensure forward compatibility.

Return value

A new CommandEvent object.

Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4