You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/01/06 00:21:28 UTC

[09/16] git commit: [flex-asjs] [refs/heads/develop] - dispatch certain events from the element

dispatch certain events from the element


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/726e1cdf
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/726e1cdf
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/726e1cdf

Branch: refs/heads/develop
Commit: 726e1cdf80779a80c4ef1fc9f79f215453177a2a
Parents: 03d6279
Author: Alex Harui <ah...@apache.org>
Authored: Mon Jan 5 10:15:35 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Jan 5 15:21:01 2015 -0800

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/html/Button.js | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/726e1cdf/frameworks/js/FlexJS/src/org/apache/flex/html/Button.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Button.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Button.js
index 671c7d2..ab9f3b9 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/Button.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Button.js
@@ -58,3 +58,15 @@ org.apache.flex.html.Button.prototype.createElement =
   return this.element;
 };
 
+
+/**
+ * @override
+ * Buttons dispatch events off the element.
+ */
+org.apache.flex.html.Button.prototype.dispatchEvent =
+    function(e) {
+  if (this.element && typeof(e) != 'string')
+    return this.element.dispatchEvent(e);
+  return org.apache.flex.html.Button.base(this, 'dispatchEvent', e);
+};
+