public class MessageEvent extends Event
MessageEvent.
For general information on which properties and functions should be supported, see
Event definitions.ALT_MASK, AT_TARGET, BLUR, BUBBLING_PHASE, CAPTURING_PHASE, CHANGE, CLICK, CONTROL_MASK, DBLCLICK, DRAGDROP, FOCUS, KEY_CURRENT_EVENT, KEYDOWN, KEYPRESS, KEYUP, META_MASK, MOUSEDOWN, MOUSEDRAG, MOUSEMOVE, MOUSEOUT, MOUSEOVER, MOUSEUP, NONE, SELECT, SHIFT_MASK, TYPE_BEFORE_UNLOAD, TYPE_BLUR, TYPE_CHANGE, TYPE_CLOSE, TYPE_DOM_DOCUMENT_LOADED, TYPE_ERROR, TYPE_FOCUS, TYPE_FOCUS_IN, TYPE_FOCUS_OUT, TYPE_HASH_CHANGE, TYPE_INPUT, TYPE_KEY_DOWN, TYPE_KEY_PRESS, TYPE_KEY_UP, TYPE_LOAD, TYPE_MESSAGE, TYPE_OPEN, TYPE_POPSTATE, TYPE_PROPERTY_CHANGE, TYPE_READY_STATE_CHANGE, TYPE_RESET, TYPE_SUBMIT, TYPE_UNLOAD| Constructor and Description |
|---|
MessageEvent()
Default constructor used to build the prototype.
|
MessageEvent(Object data)
Constructs a Message Event with the provided data.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getData()
Retrieves the data contained.
|
String |
getLastEventId()
Retrieves the identifier of the last event.
|
String |
getOrigin()
Gets the URI of the document of origin.
|
Object |
getPorts()
Returns the
ports property. |
Window |
getSource()
Retrieves the data contained.
|
void |
initMessageEvent(String type,
boolean canBubble,
boolean cancelable,
Object data,
String origin,
String lastEventId,
Window source,
Object ports)
Initializes an event object.
|
void |
jsConstructor(String type,
net.sourceforge.htmlunit.corejs.javascript.ScriptableObject details)
JavaScript constructor.
|
void |
setOrigin(String origin)
Sets the URI of the document of origin.
|
createPropertyChangeEvent, endFire, eventCreated, getAltKey, getBubbles, getCancelable, getCancelBubble, getCtrlKey, getCurrentTarget, getDefaultPrevented, getEventPhase, getKeyCode, getPropertyName, getReturnValue, getShiftKey, getSrcElement, getTarget, getTimeStamp, getType, initEvent, isAborted, isPropagationStopped, preventDefault, setAltKey, setBubbles, setCancelable, setCancelBubble, setCtrlKey, setCurrentTarget, setEventPhase, setEventType, setKeyCode, setReturnValue, setShiftKey, setSrcElement, setTarget, setType, startFire, stopPropagation, toStringclone, equivalentValues, get, getBrowserVersion, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElementdefineFunctionProperties, defineProperty, getClassName, setClassName, setParentScopeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, sizepublic MessageEvent()
public MessageEvent(Object data)
data - the datapublic void jsConstructor(String type, net.sourceforge.htmlunit.corejs.javascript.ScriptableObject details)
jsConstructor in class Eventtype - the event typedetails - the event details (optional)public void initMessageEvent(String type, boolean canBubble, boolean cancelable, Object data, String origin, String lastEventId, Window source, Object ports)
type - the event typecanBubble - can the event bubblecancelable - can the event be canceleddata - the messageorigin - the scheme, hostname and port of the document that caused the eventlastEventId - the identifier of the last eventsource - the window object that contains the document that caused the eventports - the message portspublic Object getData()
public String getOrigin()
public void setOrigin(String origin)
origin - the originpublic String getLastEventId()
public Window getSource()
public Object getPorts()
ports property.ports propertyCopyright © 2002–2016 Gargoyle Software Inc.. All rights reserved.