qnx.events.WebViewActionEvent

WebViewActionEvent

Properties | Methods | Constants


Packageqnx.events
Classpublic class WebViewActionEvent
InheritanceWebViewActionEvent Inheritance flash.events.Event

A QNXStageWebView object dispatches a WebViewActionEvent object when the webview has determined that there are appropriate user actions that could be performed. Typically this would be due to the user performing a long press on an item. The default behavior of the webkit based webview is to display a ContextMenu. If the app does not want the default behavior, it must:
  • Implement a listener for event WebViewActionEvent.ACTION
  • call WebViewActionEvent.preventDefault() on the ACTION events
  • the app can retrieve the set of actions that the webview reports as contextually appropriate, via WebViewActionEvent.actionItems
  • the app can request the webview perform an ACTION by calling QNXStageWebView.actionTriggered(actionItem:String)
  • when the app is done with the ACTION event, it must call QNXStageWebView.actionsComplete() to inform the webview

There are two types of WebViewActionEvent:

  • WebViewActionEvent.ACTION: dispatched when a set of actions is available.
  • WebViewActionEvent.CANCELLED: dispatched when the set of actions is no longer valid.


Class information:
BlackBerry 10 Version:   10.0.0

See also

QNXStageWebView



Public Properties

 PropertyDefined By
  actionItems : Vector.<String>
[read-only] The set of applicable actions provided by the webview.
WebViewActionEvent

Public Methods

 MethodDefined By
  
WebViewActionEvent(type:String, actionItems:Vector.<String> = null, bubbles:Boolean = false, cancelable:Boolean = true)
Creates a WebViewActionEvent object.
WebViewActionEvent
  
clone():Event
[override] Duplicates an instance of an Event subclass.
WebViewActionEvent
  
toString():String
[override] Returns a string that contains all the properties of the WebViewEvent object.
WebViewActionEvent

Public Constants

 ConstantDefined By
  ACTION : String = action
[static] Indicates that a set of actions is available.
WebViewActionEvent
  ACTION_ADDLINKTOBOOKMARKS : String = AddLinkToBookmarks
[static]
WebViewActionEvent
  ACTION_CANCEL : String = Cancel
[static]
WebViewActionEvent
  ACTION_CLEARFIELD : String = ClearField
[static]
WebViewActionEvent
  ACTION_COPY : String = Copy
[static]
WebViewActionEvent
  ACTION_COPYIMAGELINK : String = CopyImageLink
[static]
WebViewActionEvent
  ACTION_COPYLINK : String = CopyLink
[static]
WebViewActionEvent
  ACTION_CUT : String = Cut
[static]
WebViewActionEvent
  ACTION_DELETE : String = Delete
[static]
WebViewActionEvent
  ACTION_DISABLEDPASTE : String = DisabledPaste
[static]
WebViewActionEvent
  ACTION_FULLMENU : String = FullMenu
[static]
WebViewActionEvent
  ACTION_INSPECTELEMENT : String = InspectElement
[static]
WebViewActionEvent
  ACTION_INVALID : String = Invalid
[static]
WebViewActionEvent
  ACTION_INVOKEREQUESTS : String = InvokeRequests
[static]
WebViewActionEvent
  ACTION_OPENLINK : String = OpenLink
[static]
WebViewActionEvent
  ACTION_OPENLINKINNEWTAB : String = OpenLinkInNewTab
[static]
WebViewActionEvent
  ACTION_PASTE : String = Paste
[static]
WebViewActionEvent
  ACTION_PASTEWITHLOCK : String = PasteWithLock
[static]
WebViewActionEvent
  ACTION_SAVEIMAGE : String = SaveImage
[static]
WebViewActionEvent
  ACTION_SAVELINKAS : String = SaveLinkAs
[static]
WebViewActionEvent
  ACTION_SEARCH : String = Search
[static]
WebViewActionEvent
  ACTION_SELECT : String = Select
[static]
WebViewActionEvent
  ACTION_SELECTALL : String = SelectAll
[static]
WebViewActionEvent
  ACTION_SENDIMAGELINK : String = SendImageLink
[static]
WebViewActionEvent
  ACTION_SENDLINK : String = SendLink
[static]
WebViewActionEvent
  ACTION_SHAREIMAGE : String = ShareImage
[static]
WebViewActionEvent
  ACTION_SHARELINK : String = ShareLink
[static]
WebViewActionEvent
  ACTION_VIEWIMAGE : String = ViewImage
[static]
WebViewActionEvent
  CANCELLED : String = cancelled
[static] Indicates that the set of actions is no longer valid.
WebViewActionEvent

Property Detail

actionItems


actionItems:Vector.<String>  [read-only]

The set of applicable actions provided by the webview. Provided in the WebViewActionEvent.ACTION event.


Implementation

public function get actionItems():Vector.<String>

Constructor Detail

WebViewActionEvent()


public function WebViewActionEvent(type:String, actionItems:Vector.<String> = null, bubbles:Boolean = false, cancelable:Boolean = true)

Creates a WebViewActionEvent object.

Parameters

type:String
actionItems:Vector.<String> (default = null)
bubbles:Boolean (default = false)
cancelable:Boolean (default = true)

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

[WebViewActionEvent type=value actionItems=value bubbles=value cancelable=value eventPhase=value

Returns

String

Constant Detail

ACTION


public static const ACTION:String = action

Indicates that a set of actions is available.

ACTION_ADDLINKTOBOOKMARKS


public static const ACTION_ADDLINKTOBOOKMARKS:String = AddLinkToBookmarks

ACTION_CANCEL


public static const ACTION_CANCEL:String = Cancel

ACTION_CLEARFIELD


public static const ACTION_CLEARFIELD:String = ClearField

ACTION_COPY


public static const ACTION_COPY:String = Copy

ACTION_COPYIMAGELINK


public static const ACTION_COPYIMAGELINK:String = CopyImageLink

ACTION_COPYLINK


public static const ACTION_COPYLINK:String = CopyLink

ACTION_CUT


public static const ACTION_CUT:String = Cut

ACTION_DELETE


public static const ACTION_DELETE:String = Delete

ACTION_DISABLEDPASTE


public static const ACTION_DISABLEDPASTE:String = DisabledPaste

ACTION_FULLMENU


public static const ACTION_FULLMENU:String = FullMenu

ACTION_INSPECTELEMENT


public static const ACTION_INSPECTELEMENT:String = InspectElement

ACTION_INVALID


public static const ACTION_INVALID:String = Invalid

ACTION_INVOKEREQUESTS


public static const ACTION_INVOKEREQUESTS:String = InvokeRequests

ACTION_OPENLINK


public static const ACTION_OPENLINK:String = OpenLink

ACTION_OPENLINKINNEWTAB


public static const ACTION_OPENLINKINNEWTAB:String = OpenLinkInNewTab

ACTION_PASTE


public static const ACTION_PASTE:String = Paste

ACTION_PASTEWITHLOCK


public static const ACTION_PASTEWITHLOCK:String = PasteWithLock

ACTION_SAVEIMAGE


public static const ACTION_SAVEIMAGE:String = SaveImage

ACTION_SAVELINKAS


public static const ACTION_SAVELINKAS:String = SaveLinkAs

ACTION_SEARCH


public static const ACTION_SEARCH:String = Search

ACTION_SELECT


public static const ACTION_SELECT:String = Select

ACTION_SELECTALL


public static const ACTION_SELECTALL:String = SelectAll

ACTION_SENDIMAGELINK


public static const ACTION_SENDIMAGELINK:String = SendImageLink

ACTION_SENDLINK


public static const ACTION_SENDLINK:String = SendLink

ACTION_SHAREIMAGE


public static const ACTION_SHAREIMAGE:String = ShareImage

ACTION_SHARELINK


public static const ACTION_SHARELINK:String = ShareLink

ACTION_VIEWIMAGE


public static const ACTION_VIEWIMAGE:String = ViewImage

CANCELLED


public static const CANCELLED:String = cancelled

Indicates that the set of actions is no longer valid.





comments powered by Disqus