qnx.events.WebDownloadRequestEvent

WebDownloadRequestEvent

Properties | Methods | Constants


Packageqnx.events
Classpublic class WebDownloadRequestEvent
InheritanceWebDownloadRequestEvent Inheritance flash.events.Event

A QNXStageWebView object dispatches a WebDownloadRequestEvent object when a download has been requested. This event must be responded to by setting the action property.

There is only one type of WebDownloadRequestEvent:

  • WebDownloadRequestEvent.DOWNLOAD_REQUEST: dispatched when a download is requested. Cannot be cancelled.


Class information:
BlackBerry 10 Version:   10.0.0

See also

QNXStageWebView



Public Properties

 PropertyDefined By
  action : String
The action to take.
WebDownloadRequestEvent
  downloadId : uint
The identifier of the download.
WebDownloadRequestEvent
  filename : String
The filename of the file is being downloaded.
WebDownloadRequestEvent
  url : String
The URL where the file is being downloaded from.
WebDownloadRequestEvent

Public Methods

 MethodDefined By
  
WebDownloadRequestEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, downloadId:uint = 0, url:String, filename:String, action:String)
Creates a WebDownloadRequestEvent object.
WebDownloadRequestEvent
  
clone():Event
[override] Duplicates an instance of an Event subclass.
WebDownloadRequestEvent
  
toString():String
[override] Returns a string that contains all the properties of the WebDownloadRequestEvent object.
WebDownloadRequestEvent

Public Constants

 ConstantDefined By
  ACTION_DISCARD : String = actionDiscard
[static] Indicates that the download should be cancelled.
WebDownloadRequestEvent
  ACTION_PENDING : String = actionPending
[static] Indicates that the download should marked as pending to be started or discarded at a later time.
WebDownloadRequestEvent
  ACTION_SAVE : String = actionSave
[static] Indicates that the file should be saved.
WebDownloadRequestEvent
  DOWNLOAD_REQUEST : String = downloadRequest
[static] Signals that a download is about to start.
WebDownloadRequestEvent

Property Detail

action


action:String

The action to take.


Implementation

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

downloadId


downloadId:uint

The identifier of the download. Used to refer to this download in future events and in API calls.


Implementation

public function get downloadId():uint
public function set downloadId(value:uint):void

filename


filename:String

The filename of the file is being downloaded.


Implementation

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

url


url:String

The URL where the file is being downloaded from.


Implementation

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

Constructor Detail

WebDownloadRequestEvent()


public function WebDownloadRequestEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, downloadId:uint = 0, url:String, filename:String, action:String)

Creates a WebDownloadRequestEvent object.

Parameters

type:String
bubbles:Boolean (default = false)
cancelable:Boolean (default = false)
downloadId:uint (default = 0)
url:String
filename:String
action:String

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

[WebDownloadRequestEvent type=value bubbles=value cancelable=value eventPhase=value downloadId=value url=value filename=value action=value

Returns

String

Constant Detail

ACTION_DISCARD


public static const ACTION_DISCARD:String = actionDiscard

Indicates that the download should be cancelled.

ACTION_PENDING


public static const ACTION_PENDING:String = actionPending

Indicates that the download should marked as pending to be started or discarded at a later time.

ACTION_SAVE


public static const ACTION_SAVE:String = actionSave

Indicates that the file should be saved.

DOWNLOAD_REQUEST


public static const DOWNLOAD_REQUEST:String = downloadRequest

Signals that a download is about to start. You must set the action that you wish to take in response to this event. The default action is to discard the download.





comments powered by Disqus