weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acton...@apache.org
Subject [11/39] incubator-weex git commit: * [jsfm] export more reliable sendTask method
Date Tue, 08 Aug 2017 08:55:23 GMT
* [jsfm] export more reliable sendTask method


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d2393899
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d2393899
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d2393899

Branch: refs/heads/0.16-dev
Commit: d239389950e036f052c4ad8da7080ec49dfb1d6a
Parents: 80b3eae
Author: Hanks <zhanghan.me@gmail.com>
Authored: Fri Jul 28 13:54:04 2017 +0800
Committer: Hanks <zhanghan.me@gmail.com>
Committed: Fri Jul 28 13:54:04 2017 +0800

----------------------------------------------------------------------
 html5/runtime/config.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d2393899/html5/runtime/config.js
----------------------------------------------------------------------
diff --git a/html5/runtime/config.js b/html5/runtime/config.js
index 4a8fd58..695aa66 100644
--- a/html5/runtime/config.js
+++ b/html5/runtime/config.js
@@ -24,7 +24,10 @@ const config = {
   Document, Element, Comment, Listener,
   TaskCenter,
   sendTasks (...args) {
-    return global.callNative(...args)
+    if (typeof callNative === 'function') {
+      return callNative(...args)
+    }
+    return (global.callNative || (() => {}))(...args)
   }
 }
 


Mime
View raw message