Class FocusEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The FocusEvent interface represents focus-related events, including Elementfocus, Elementblur, Elementfocusin, and Elementfocusout.
[Value("FocusEvent")]
public class FocusEvent : UIEvent
- Inheritance
-
FocusEvent
- Inherited Members
Remarks
-The Event base interface
Constructors
FocusEvent()
public FocusEvent()
FocusEvent(string, FocusEventInit)
The FocusEvent() constructor returns a newly created
FocusEvent object with an optional EventTarget. When the
event has both a source and a destination, the relatedTarget value must be
set to the other target.
public FocusEvent(string type, FocusEventInit eventInitDict = null)
Parameters
typestringeventInitDictFocusEventInit
Remarks
-The FocusEvent interface it belongs to.
Properties
RelatedTarget
The relatedTarget read-only property of the FocusEvent interface is the secondary target, depending on the type of event:
[Value("relatedTarget")]
public EventTarget? RelatedTarget { get; }
Property Value
- EventTarget
An instance of EventTarget.
Remarks
Note that many elements can't have focus, which is a common reason for relatedTarget to be null. relatedTarget may also be set to null for security reasons, like when tabbing in or out of a page.
RelatedTarget is a similar property for mouse events.