OnClickData class
Information sent when a context menu item is clicked.
class OnClickData extends ChromeObject { OnClickData({var menuItemId, var parentMenuItemId, String mediaType, String linkUrl, String srcUrl, String pageUrl, String frameUrl, String selectionText, bool editable, bool wasChecked, bool checked}) { if (menuItemId != null) this.menuItemId = menuItemId; if (parentMenuItemId != null) this.parentMenuItemId = parentMenuItemId; if (mediaType != null) this.mediaType = mediaType; if (linkUrl != null) this.linkUrl = linkUrl; if (srcUrl != null) this.srcUrl = srcUrl; if (pageUrl != null) this.pageUrl = pageUrl; if (frameUrl != null) this.frameUrl = frameUrl; if (selectionText != null) this.selectionText = selectionText; if (editable != null) this.editable = editable; if (wasChecked != null) this.wasChecked = wasChecked; if (checked != null) this.checked = checked; } OnClickData.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy); /** * The ID of the menu item that was clicked. */ dynamic get menuItemId => jsProxy['menuItemId']; set menuItemId(var value) => jsProxy['menuItemId'] = jsify(value); /** * The parent ID, if any, for the item clicked. */ dynamic get parentMenuItemId => jsProxy['parentMenuItemId']; set parentMenuItemId(var value) => jsProxy['parentMenuItemId'] = jsify(value); /** * One of 'image', 'video', or 'audio' if the context menu was activated on * one of these types of elements. */ String get mediaType => jsProxy['mediaType']; set mediaType(String value) => jsProxy['mediaType'] = value; /** * If the element is a link, the URL it points to. */ String get linkUrl => jsProxy['linkUrl']; set linkUrl(String value) => jsProxy['linkUrl'] = value; /** * Will be present for elements with a 'src' URL. */ String get srcUrl => jsProxy['srcUrl']; set srcUrl(String value) => jsProxy['srcUrl'] = value; /** * The URL of the page where the menu item was clicked. This property is not * set if the click occured in a context where there is no current page, such * as in a launcher context menu. */ String get pageUrl => jsProxy['pageUrl']; set pageUrl(String value) => jsProxy['pageUrl'] = value; /** * The URL of the frame of the element where the context menu was clicked, if * it was in a frame. */ String get frameUrl => jsProxy['frameUrl']; set frameUrl(String value) => jsProxy['frameUrl'] = value; /** * The text for the context selection, if any. */ String get selectionText => jsProxy['selectionText']; set selectionText(String value) => jsProxy['selectionText'] = value; /** * A flag indicating whether the element is editable (text input, textarea, * etc.). */ bool get editable => jsProxy['editable']; set editable(bool value) => jsProxy['editable'] = value; /** * A flag indicating the state of a checkbox or radio item before it was * clicked. */ bool get wasChecked => jsProxy['wasChecked']; set wasChecked(bool value) => jsProxy['wasChecked'] = value; /** * A flag indicating the state of a checkbox or radio item after it is * clicked. */ bool get checked => jsProxy['checked']; set checked(bool value) => jsProxy['checked'] = value; }
Extends
ChromeObject > OnClickData
Constructors
new OnClickData({menuItemId, parentMenuItemId, String mediaType, String linkUrl, String srcUrl, String pageUrl, String frameUrl, String selectionText, bool editable, bool wasChecked, bool checked}) #
Create a new instance of a ChromeObject
, which creates and delegates to
a JsObject proxy.
OnClickData({var menuItemId, var parentMenuItemId, String mediaType, String linkUrl, String srcUrl, String pageUrl, String frameUrl, String selectionText, bool editable, bool wasChecked, bool checked}) { if (menuItemId != null) this.menuItemId = menuItemId; if (parentMenuItemId != null) this.parentMenuItemId = parentMenuItemId; if (mediaType != null) this.mediaType = mediaType; if (linkUrl != null) this.linkUrl = linkUrl; if (srcUrl != null) this.srcUrl = srcUrl; if (pageUrl != null) this.pageUrl = pageUrl; if (frameUrl != null) this.frameUrl = frameUrl; if (selectionText != null) this.selectionText = selectionText; if (editable != null) this.editable = editable; if (wasChecked != null) this.wasChecked = wasChecked; if (checked != null) this.checked = checked; }
new OnClickData.fromProxy(JsObject jsProxy) #
Create a new instance of a ChromeObject
, which delegates to the given
JsObject proxy.
OnClickData.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);
Properties
bool checked #
A flag indicating the state of a checkbox or radio item after it is clicked.
bool get checked => jsProxy['checked'];
set checked(bool value) => jsProxy['checked'] = value;
bool editable #
A flag indicating whether the element is editable (text input, textarea, etc.).
bool get editable => jsProxy['editable'];
set editable(bool value) => jsProxy['editable'] = value;
String frameUrl #
The URL of the frame of the element where the context menu was clicked, if it was in a frame.
String get frameUrl => jsProxy['frameUrl'];
set frameUrl(String value) => jsProxy['frameUrl'] = value;
String linkUrl #
If the element is a link, the URL it points to.
String get linkUrl => jsProxy['linkUrl'];
set linkUrl(String value) => jsProxy['linkUrl'] = value;
String mediaType #
One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements.
String get mediaType => jsProxy['mediaType'];
set mediaType(String value) => jsProxy['mediaType'] = value;
var menuItemId #
The ID of the menu item that was clicked.
dynamic get menuItemId => jsProxy['menuItemId'];
set menuItemId(var value) => jsProxy['menuItemId'] = jsify(value);
String pageUrl #
The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu.
String get pageUrl => jsProxy['pageUrl'];
set pageUrl(String value) => jsProxy['pageUrl'] = value;
var parentMenuItemId #
The parent ID, if any, for the item clicked.
dynamic get parentMenuItemId => jsProxy['parentMenuItemId'];
set parentMenuItemId(var value) => jsProxy['parentMenuItemId'] = jsify(value);
String selectionText #
The text for the context selection, if any.
String get selectionText => jsProxy['selectionText'];
set selectionText(String value) => jsProxy['selectionText'] = value;
String srcUrl #
Will be present for elements with a 'src' URL.
String get srcUrl => jsProxy['srcUrl'];
set srcUrl(String value) => jsProxy['srcUrl'] = value;
bool wasChecked #
A flag indicating the state of a checkbox or radio item before it was clicked.
bool get wasChecked => jsProxy['wasChecked'];
set wasChecked(bool value) => jsProxy['wasChecked'] = value;
Methods
String toString() #
Returns a string representation of this object.
String toString() => jsProxy.toString();