qnx.events.NetworkResourceRequestedEvent

NetworkResourceRequestedEvent

Properties | Methods | Constants


Packageqnx.events
Classpublic class NetworkResourceRequestedEvent
InheritanceNetworkResourceRequestedEvent Inheritance flash.events.Event

A QNXStageWebView object dispatches a NetworkResourceRequestedEvent object when a network resource is being requested. The URL of the resource is in the url property of the event.

There is only one type of NetworkResourceRequestedEvent:

  • NetworkResourceRequestedEvent.NETWORK_RESOURCE_REQUESTED: dispatched when a resource is about to be loaded. Can be cancelled.


Class information:
PlayBook Tablet OS Version:   1.0.6

See also

QNXStageWebView



Public Properties

 PropertyDefined By
  action : String
Determines the url of the resource to be loaded.
NetworkResourceRequestedEvent
  streamId : int
Determines the ID of the resource to be loaded.
NetworkResourceRequestedEvent
  targetType : String
Determines the target of the resource to be loaded.
NetworkResourceRequestedEvent
  url : String
Determines the url of the resource to be loaded.
NetworkResourceRequestedEvent

Public Methods

 MethodDefined By
  
NetworkResourceRequestedEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = true, streamId:int = 0, url:String = null, action:String, targetType:String)
Creates a NetworkResourceRequestedEvent object.
NetworkResourceRequestedEvent
  
clone():Event
[override] Duplicates an instance of an Event subclass.
NetworkResourceRequestedEvent
  
toString():String
[override] Returns a String that contains all the properties of the NetworkResourceRequestedEvent object.
NetworkResourceRequestedEvent

Public Constants

 ConstantDefined By
  ACTION_ACCEPT : String = accept
[static]
NetworkResourceRequestedEvent
  ACTION_DENY : String = deny
[static]
NetworkResourceRequestedEvent
  ACTION_FILTER : String = filter
[static]
NetworkResourceRequestedEvent
  ACTION_SUBSTITUTE : String = substitute
[static]
NetworkResourceRequestedEvent
  NETWORK_RESOURCE_REQUESTED : String = networkResourceRequested
[static] Dispatched when a network resource is requested.
NetworkResourceRequestedEvent
  TARGET_IS_FONT_RESOURCE : String = targetIsFontResource
[static]
NetworkResourceRequestedEvent
  TARGET_IS_IMAGE : String = targetIsImage
[static]
NetworkResourceRequestedEvent
  TARGET_IS_MAIN_FRAME : String = targetIsMainFrame
[static]
NetworkResourceRequestedEvent
  TARGET_IS_MEDIA : String = targetIsMedia
[static]
NetworkResourceRequestedEvent
  TARGET_IS_OBJECT : String = targetIsObject
[static]
NetworkResourceRequestedEvent
  TARGET_IS_SCRIPT : String = targetIsScript
[static]
NetworkResourceRequestedEvent
  TARGET_IS_SHARED_WORKER : String = targetIsSharedWorker
[static]
NetworkResourceRequestedEvent
  TARGET_IS_STYLE_SHEET : String = targetIsStyleSheet
[static]
NetworkResourceRequestedEvent
  TARGET_IS_SUBFRAME : String = targetIsSubframe
[static]
NetworkResourceRequestedEvent
  TARGET_IS_SUBRESOURCE : String = targetIsSubresource
[static]
NetworkResourceRequestedEvent
  TARGET_IS_UNKNOWN : String = targetIsUnknown
[static]
NetworkResourceRequestedEvent
  TARGET_IS_WORKER : String = targetIsWorker
[static]
NetworkResourceRequestedEvent
  TARGET_IS_XML_HTTP_REQUEST : String = targetIsXMLHTTPRequest
[static]
NetworkResourceRequestedEvent

Property Detail

action


action:String

Determines the url of the resource to be loaded.


Implementation

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

streamId


streamId:int

Determines the ID of the resource to be loaded.


Implementation

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

targetType


targetType:String

Determines the target of the resource to be loaded.


Implementation

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

url


url:String

Determines the url of the resource to be loaded.


Implementation

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

Constructor Detail

NetworkResourceRequestedEvent()


public function NetworkResourceRequestedEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = true, streamId:int = 0, url:String = null, action:String, targetType:String)

Creates a NetworkResourceRequestedEvent object.

Parameters

type:String
bubbles:Boolean (default = false)
cancelable:Boolean (default = true)
streamId:int (default = 0)
url:String (default = null)
action:String (default = NaN)
targetType:String (default = NaN)

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

[NetworkResourceRequestedEvent type=value bubbles=value cancelable=value eventPhase=value streamId=value url=value action=value targetType=value]

Returns

String

Constant Detail

ACTION_ACCEPT


public static const ACTION_ACCEPT:String = accept

ACTION_DENY


public static const ACTION_DENY:String = deny

ACTION_FILTER


public static const ACTION_FILTER:String = filter

ACTION_SUBSTITUTE


public static const ACTION_SUBSTITUTE:String = substitute

NETWORK_RESOURCE_REQUESTED


public static const NETWORK_RESOURCE_REQUESTED:String = networkResourceRequested

Dispatched when a network resource is requested. The URL of the resource is contained in the url property of the event.

Specify the action you wish to take for this resource:

  • NetworkResourceRequestedEvent.ACTION_ACCEPT: (Default) Load the resource.
  • NetworkResourceRequestedEvent.ACTION_DENY: Abort loading this resource.
  • NetworkResourceRequestedEvent.ACTION_FILTER: Filter the resource loading, further events will be received for each stage of the open and data can be substited or monitored at that time.
  • NetworkResourceRequestedEvent.ACTION_SUBSTITUTE: Substitute the entire load with your own data. Must call NetworkResourceOpened, NetworkResourceDone, NetworkResourceHeaderReceived and NetworkResourceDataReceived with the m_streamId in this event.

TARGET_IS_FONT_RESOURCE


public static const TARGET_IS_FONT_RESOURCE:String = targetIsFontResource

TARGET_IS_IMAGE


public static const TARGET_IS_IMAGE:String = targetIsImage

TARGET_IS_MAIN_FRAME


public static const TARGET_IS_MAIN_FRAME:String = targetIsMainFrame

TARGET_IS_MEDIA


public static const TARGET_IS_MEDIA:String = targetIsMedia

TARGET_IS_OBJECT


public static const TARGET_IS_OBJECT:String = targetIsObject

TARGET_IS_SCRIPT


public static const TARGET_IS_SCRIPT:String = targetIsScript

TARGET_IS_SHARED_WORKER


public static const TARGET_IS_SHARED_WORKER:String = targetIsSharedWorker

TARGET_IS_STYLE_SHEET


public static const TARGET_IS_STYLE_SHEET:String = targetIsStyleSheet

TARGET_IS_SUBFRAME


public static const TARGET_IS_SUBFRAME:String = targetIsSubframe

TARGET_IS_SUBRESOURCE


public static const TARGET_IS_SUBRESOURCE:String = targetIsSubresource

TARGET_IS_UNKNOWN


public static const TARGET_IS_UNKNOWN:String = targetIsUnknown

TARGET_IS_WORKER


public static const TARGET_IS_WORKER:String = targetIsWorker

TARGET_IS_XML_HTTP_REQUEST


public static const TARGET_IS_XML_HTTP_REQUEST:String = targetIsXMLHTTPRequest