qnx.events.JavaScriptExceptionEvent

JavaScriptExceptionEvent

Properties | Methods | Constants


Packageqnx.events
Classpublic class JavaScriptExceptionEvent
InheritanceJavaScriptExceptionEvent Inheritance flash.events.Event

A QNXStageWebView object dispatches a JavaScriptExceptionEvent object when a JavaScript error occurs. The event includes the exception String, line number and file where the exception has occurred.

There is only one type of JavaScriptExceptionEvent:

  • JavaScriptExceptionEvent.JAVA_SCRIPT_EXCEPTION: dispatched after an asynchronous JavaScript exception occurs. Cannot be cancelled.


Class information:
BlackBerry 10 Version:   10.0.0

See also

QNXStageWebView



Public Properties

 PropertyDefined By
  exception : String
Returns the exception String.
JavaScriptExceptionEvent
  file : String
Returns the file name where the exception took place.
JavaScriptExceptionEvent
  line : int
Returns the line number where the exception occurred.
JavaScriptExceptionEvent

Public Methods

 MethodDefined By
  
JavaScriptExceptionEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, exception:String = null, file:String = null, line:int = 0)
Creates a JavaScriptExceptionEvent object.
JavaScriptExceptionEvent
  
clone():Event
[override] Duplicates an instance of an Event subclass.
JavaScriptExceptionEvent
  
toString():String
[override] Returns a string that contains all the properties of the JavaScriptExceptionEvent object.
JavaScriptExceptionEvent

Public Constants

 ConstantDefined By
  JAVA_SCRIPT_EXCEPTION : String = javaScriptException
[static] Dispatched when a JavaScript exception has occurred.
JavaScriptExceptionEvent

Property Detail

exception


exception:String

Returns the exception String.


Implementation

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

file


file:String

Returns the file name where the exception took place.


Implementation

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

line


line:int

Returns the line number where the exception occurred.


Implementation

public function get line():int
public function set line(value:int):void

Constructor Detail

JavaScriptExceptionEvent()


public function JavaScriptExceptionEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, exception:String = null, file:String = null, line:int = 0)

Creates a JavaScriptExceptionEvent object.

Parameters

type:String
bubbles:Boolean (default = false)
cancelable:Boolean (default = false)
exception:String (default = null)
file:String (default = null)
line:int (default = 0)

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 JavaScriptExceptionEvent object. The string is in the following format:

[JavaScriptExceptionEvent type=value bubbles=value cancelable=value eventPhase=value exception=value file=value line=value

Returns

String

Constant Detail

JAVA_SCRIPT_EXCEPTION


public static const JAVA_SCRIPT_EXCEPTION:String = javaScriptException

Dispatched when a JavaScript exception has occurred. The event contains the exception String, line number, and file where the exception occurred. This event cannot be cancelled.





comments powered by Disqus