flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [09/16] git commit: [flex-asjs] [refs/heads/develop] - dispatch certain events from the element
Date Mon, 05 Jan 2015 23:21:28 GMT
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 <aharui@apache.org>
Authored: Mon Jan 5 10:15:35 2015 -0800
Committer: Alex Harui <aharui@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);
+};
+


Mime
View raw message