@DOMObjectAttribute @DOMNameAttribute(name="CustomEvent") public class CustomEvent extends Event
Events using the CustomEvent interface can be used to carry custom data.
Modifier and Type | Class and Description |
---|---|
static class |
CustomEvent.CustomEventInit
Represents a dictionary that is having optional arguments for setting the detail information about the event.
|
Event.EventInit
AT_TARGET_PHASE, BUBBLING_PHASE, CAPTURING_PHASE, NONE_PHASE
PropertyChanged
Constructor and Description |
---|
CustomEvent(String type)
Initializes a new instance of the
CustomEvent class. |
CustomEvent(String type,
CustomEvent.CustomEventInit eventInitDict)
Initializes a new instance of the
CustomEvent class. |
Modifier and Type | Method and Description |
---|---|
Object |
getDetail()
Gets the custom data.
|
void |
initCustomEvent(String type,
boolean bubbles,
boolean cancelable,
Object detail)
/// The
Event.initEvent(String, boolean, boolean) method is used to initialize the value of an Event created through the IDocumentEvent interface. |
createDOMContentLoadedEvent, createError, createEvent, createEvent, createEventByType, dispatch, getBubbles, getCancelable, getCurrentTarget, getDefaultPrevented, getEventPhase, getTarget, getTimeStamp, getType, initEvent, isTrusted, preventDefault, setCurrentTarget, setEventPhase, setTarget, stopImmediatePropagation, stopPropagation
fireNotifyPropertyChanged, getCurrentValues, getRuntimesBinding, setCurrentValues, setField, setRuntimesBinding
public CustomEvent(String type)
Initializes a new instance of the CustomEvent
class.
type
- The event type.public CustomEvent(String type, CustomEvent.CustomEventInit eventInitDict)
Initializes a new instance of the CustomEvent
class.
type
- The event type.eventInitDict
- The event initialize dictionary.@DOMNameAttribute(name="detail") public Object getDetail()
Gets the custom data.
Value: The detail.@DOMNameAttribute(name="initCustomEvent") public void initCustomEvent(String type, boolean bubbles, boolean cancelable, Object detail)
/// The Event.initEvent(String, boolean, boolean)
method is used to initialize the value of an Event
created through the IDocumentEvent
interface.
type
- The event type.bubbles
- if set to true
[bubbles].cancelable
- if set to true
[cancelable].detail
- The custom data.
IEventTarget.dispatchEvent(com.aspose.html.dom.events.Event)
method,
though it may be called multiple times during that phase if necessary.
If called multiple times the final invocation takes precedence.
If called from a subclass of Event interface only the values specified in the initEvent method are modified, all other attributes are left unchanged.