qnx.events.JavaScriptResultEvent

JavaScriptResultEvent

Properties | Methods | Constants


Packageqnx.events
Classpublic class JavaScriptResultEvent
InheritanceJavaScriptResultEvent Inheritance flash.events.Event

A QNXStageWebView object dispatches a JavaScriptResultEvent object when the result of an asynchronously executed JavaScript (started with an executeJavaScript call) is available.

There is only one type of JavaScriptResultEvent:

  • JavaScriptResultEvent.JAVA_SCRIPT_RESULT: dispatched after a asynchronous JavaScript execution completes. Cannot be cancelled.


Class information:
BlackBerry 10 Version:   10.0.0

See also

QNXStageWebView



Public Properties

 PropertyDefined By
  result : String
The result string from the executeJavaScript call.
JavaScriptResultEvent
  resultType : String
The type of data returned from the executeJavaScript call.
JavaScriptResultEvent
  uniqueId : String
The unique id of of the executeJavaScript call.
JavaScriptResultEvent

Public Methods

 MethodDefined By
  
JavaScriptResultEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, uniqueId:String = null, result:String = null, resultType:String = null)
Creates a JavaScriptResultEvent object.
JavaScriptResultEvent
  
clone():Event
[override] Duplicates an instance of an Event subclass.
JavaScriptResultEvent
  
toString():String
[override] Returns a String that contains all the properties of the JavaScriptResultEvent object.
JavaScriptResultEvent

Public Constants

 ConstantDefined By
  JAVA_SCRIPT_RESULT : String = javaScriptResult
[static] Dispatched when the result of a executeJavaScript call has been completed.
JavaScriptResultEvent
  RESULT_TYPE_BOOLEAN : String = resultTypeBoolean
[static] A Boolean is returned.
JavaScriptResultEvent
  RESULT_TYPE_EXCEPTION : String = resultTypeException
[static] An exception is returned.
JavaScriptResultEvent
  RESULT_TYPE_NULL : String = resultTypeNull
[static] NULL is returned.
JavaScriptResultEvent
  RESULT_TYPE_NUMBER : String = resultTypeNumber
[static] A Number is returned.
JavaScriptResultEvent
  RESULT_TYPE_OBJECT : String = resultTypeObject
[static] An Object is returned.
JavaScriptResultEvent
  RESULT_TYPE_STRING : String = resultTypeString
[static] A String is returned.
JavaScriptResultEvent
  RESULT_TYPE_UNDEFINED : String = resultTypeUndefined
[static] An undefined type is returned.
JavaScriptResultEvent

Property Detail

result


result:String

The result string from the executeJavaScript call.


Implementation

public function get result():String
public function set result(value:String):void

resultType


resultType:String

The type of data returned from the executeJavaScript call.


Implementation

public function get resultType():String
public function set resultType(value:String):void

uniqueId


uniqueId:String

The unique id of of the executeJavaScript call.


Implementation

public function get uniqueId():String
public function set uniqueId(value:String):void

Constructor Detail

JavaScriptResultEvent()


public function JavaScriptResultEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, uniqueId:String = null, result:String = null, resultType:String = null)

Creates a JavaScriptResultEvent object.

Parameters

type:String
bubbles:Boolean (default = false)
cancelable:Boolean (default = false)
uniqueId:String (default = null)
result:String (default = null)
resultType:String (default = null)

Method Detail

clone()


override public function clone():Event

Duplicates an instance of an Event subclass.

Returns a new Event object that is a copy of the original instance of the Event object. You do not normally call clone(); the EventDispatcher class calls it automatically when you redispatch an event—that is, when you call dispatchEvent(event) from a handler that is handling event.

The new Event object includes all the properties of the original.

When creating your own custom Event class, you must override the inherited Event.clone() method in order for it to duplicate the properties of your custom class. If you do not set all the properties that you add in your event subclass, those properties will not have the correct values when listeners handle the redispatched event.

Returns

Event

toString()


override public function toString():String

Returns a String that contains all the properties of the JavaScriptResultEvent object. The String is in the following format:

[JavaScriptResultEvent type=value bubbles=value cancelable=value eventPhase=value uniqueId=value result=value

Returns

String

Constant Detail

JAVA_SCRIPT_RESULT


public static const JAVA_SCRIPT_RESULT:String = javaScriptResult

Dispatched when the result of a executeJavaScript call has been completed. The uniqueId property of the event contains the uniqueId string that was returned from the executeJavaScript call.

RESULT_TYPE_BOOLEAN


public static const RESULT_TYPE_BOOLEAN:String = resultTypeBoolean

A Boolean is returned.

RESULT_TYPE_EXCEPTION


public static const RESULT_TYPE_EXCEPTION:String = resultTypeException

An exception is returned.

RESULT_TYPE_NULL


public static const RESULT_TYPE_NULL:String = resultTypeNull

NULL is returned.

RESULT_TYPE_NUMBER


public static const RESULT_TYPE_NUMBER:String = resultTypeNumber

A Number is returned.

RESULT_TYPE_OBJECT


public static const RESULT_TYPE_OBJECT:String = resultTypeObject

An Object is returned.

RESULT_TYPE_STRING


public static const RESULT_TYPE_STRING:String = resultTypeString

A String is returned.

RESULT_TYPE_UNDEFINED


public static const RESULT_TYPE_UNDEFINED:String = resultTypeUndefined

An undefined type is returned.





comments powered by Disqus