You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/10/23 08:10:29 UTC

[01/18] incubator-weex git commit: * [android] memory optimized for box-shadow

Repository: incubator-weex
Updated Branches:
  refs/heads/release-0.16 185d3b117 -> d69658666


* [android] memory optimized for box-shadow


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

Branch: refs/heads/release-0.16
Commit: 43b013c0c826bfa9056d23edd5adc685f929ee1b
Parents: 0506388
Author: misakuo <mi...@apache.org>
Authored: Mon Oct 23 13:10:10 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Mon Oct 23 13:10:10 2017 +0800

----------------------------------------------------------------------
 .../java/com/taobao/weex/common/Constants.java  |  1 +
 .../taobao/weex/ui/component/WXComponent.java   | 17 +++-
 .../com/taobao/weex/utils/BoxShadowUtil.java    | 88 +++++++++++++-------
 3 files changed, 75 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43b013c0/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index e74e083..94ac1e0 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -85,6 +85,7 @@ public class Constants {
     String BORDER_LEFT_STYLE = "borderLeftStyle";
     String BORDER_TOP_STYLE = "borderTopStyle";
     String BOX_SHADOW = "boxShadow";
+    String SHADOW_QUALITY = "shadowQuality";
 
     String POSITION = "position";
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43b013c0/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 3df1492..bd6c2d7 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -143,6 +143,7 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
   private boolean mIsDisabled = false;
   private int mType = TYPE_COMMON;
   private boolean mNeedLayoutOnAnimation = false;
+  private String mLastBoxShadowId;
 
   public WXTracing.TraceInfo mTraceInfo = new WXTracing.TraceInfo();
 
@@ -860,6 +861,7 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
   protected void updateBoxShadow() {
     if (getDomObject() != null && getDomObject().getStyles() != null) {
       Object boxShadow = getDomObject().getStyles().get(Constants.Name.BOX_SHADOW);
+      Object shadowQuality = getDomObject().getAttrs().get(Constants.Name.SHADOW_QUALITY);
       if (boxShadow == null) {
         return;
       }
@@ -873,6 +875,18 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
         return;
       }
 
+      float quality = WXUtils.getFloat(shadowQuality, 0.5f);
+      int viewPort = getInstance().getInstanceViewPortWidth();
+      String token = new StringBuilder(boxShadow.toString()).append(" / [")
+          .append(getDomObject().getStyles().getWidth(viewPort)).append(",")
+          .append(getDomObject().getStyles().getHeight(viewPort)).append("] / ")
+          .append(quality).toString();
+
+      if (mLastBoxShadowId != null && mLastBoxShadowId.equals(token)) {
+        WXLogUtils.d("BoxShadow", "box-shadow style was not modified. " + token);
+        return;
+      }
+
       float[] radii = new float[] {0, 0, 0, 0, 0, 0, 0, 0};
       WXStyle style = getDomObject().getStyles();
       if (style != null) {
@@ -900,7 +914,8 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
         }
       }
 
-      BoxShadowUtil.setBoxShadow(target, boxShadow.toString(), radii, getInstance().getInstanceViewPortWidth());
+      BoxShadowUtil.setBoxShadow(target, boxShadow.toString(), radii, viewPort, quality);
+      mLastBoxShadowId = token;
     } else {
       WXLogUtils.w("Can not resolve styles");
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43b013c0/android/sdk/src/main/java/com/taobao/weex/utils/BoxShadowUtil.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/BoxShadowUtil.java b/android/sdk/src/main/java/com/taobao/weex/utils/BoxShadowUtil.java
index 3f522dd..d8a9927 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/BoxShadowUtil.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/BoxShadowUtil.java
@@ -36,6 +36,8 @@ import android.graphics.Shader;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.os.Build;
+import android.support.annotation.IntRange;
+import android.support.annotation.Nullable;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.View;
@@ -59,7 +61,7 @@ import java.util.List;
 public class BoxShadowUtil {
   private static final String TAG = "BoxShadowUtil";
 
-  public static void setBoxShadow(final View target, String style, float[] radii, int viewPort) {
+  public static void setBoxShadow(final View target, String style, float[] radii, int viewPort, final float quality) {
     final BoxShadowOptions options = parseBoxShadow(style, viewPort);
     if (options == null) {
       WXLogUtils.w(TAG, "Failed to parse box-shadow: " + style);
@@ -95,9 +97,9 @@ public class BoxShadowUtil {
       @Override
       public void run() {
         if (options.isInset) {
-          setInsetBoxShadow(target, options);
+          setInsetBoxShadow(target, options, quality);
         } else {
-          setNormalBoxShadow(target, options);
+          setNormalBoxShadow(target, options, quality);
         }
       }
     });
@@ -110,7 +112,10 @@ public class BoxShadowUtil {
     int canvasWidth = viewWidth + 2 * (int) (shadowRadius + shadowSpread + Math.abs(dx));
     int canvasHeight = viewHeight + 2 * (int) (shadowRadius + shadowSpread + Math.abs(dy));
 
-    Bitmap output = Bitmap.createBitmap(canvasWidth, canvasHeight, Bitmap.Config.ARGB_8888);
+    Bitmap output = Bitmap.createBitmap(canvasWidth, canvasHeight, Bitmap.Config.ARGB_4444);
+    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+      WXLogUtils.d(TAG, "Allocation memory for box-shadow: " + (output.getAllocationByteCount() / 1024) + " KB");
+    }
     Canvas canvas = new Canvas(output);
 
     if (false && WXEnvironment.isApkDebugable()) {
@@ -122,18 +127,6 @@ public class BoxShadowUtil {
       canvas.drawRect(canvas.getClipBounds(), strokePaint);
     }
 
-    float offsetX = shadowRadius + shadowSpread + Math.abs(dx);
-    float offsetY = shadowRadius + shadowSpread + Math.abs(dy);
-    RectF selfRect = new RectF(
-        offsetX,
-        offsetY,
-        (float) Math.floor(viewWidth + offsetX),
-        (float) Math.floor(viewHeight + offsetY));
-    Path contentPath = new Path();
-    contentPath.addRoundRect(selfRect, radii, Path.Direction.CCW);
-    // can not antialias
-    canvas.clipPath(contentPath, Region.Op.DIFFERENCE);
-
     RectF shadowRect = new RectF(
         0f, 0f,
         viewWidth + 2f * shadowSpread, viewHeight + 2f * shadowSpread
@@ -173,7 +166,7 @@ public class BoxShadowUtil {
     return output;
   }
 
-  private static void setNormalBoxShadow(View target, BoxShadowOptions options) {
+  private static void setNormalBoxShadow(View target, BoxShadowOptions options, float quality) {
     int h = target.getHeight();
     int w = target.getWidth();
 
@@ -183,14 +176,14 @@ public class BoxShadowUtil {
     }
 
     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
-      Bitmap shadowBitmap = createShadowBitmap(w, h, options.radii, options.blur, options.spread, options.hShadow, options.vShadow, options.color);
+      options.viewWidth = w;
+      options.viewHeight = h;
 
-      int overflowX = (int) (options.blur + Math.abs(options.hShadow) + options.spread);
-      int overflowY = (int) (options.blur + Math.abs(options.vShadow) + options.spread);
+      BoxShadowOptions scaleOptions = options.scale(quality);
+      Bitmap shadowBitmap = createShadowBitmap(scaleOptions.viewWidth, scaleOptions.viewHeight, scaleOptions.radii, scaleOptions.blur, scaleOptions.spread, scaleOptions.hShadow, scaleOptions.vShadow, scaleOptions.color);
 
       //Drawable's bounds must match the bitmap size, otherwise the shadows will be scaled
-      OverflowBitmapDrawable shadowDrawable = new OverflowBitmapDrawable(target.getResources(), shadowBitmap, overflowX, overflowY);
-      shadowDrawable.setBounds(-overflowX, -overflowY, w + overflowX, h + overflowY);
+      OverflowBitmapDrawable shadowDrawable = new OverflowBitmapDrawable(target.getResources(), shadowBitmap, options);
 
       target.getOverlay().clear();
       target.getOverlay().add(shadowDrawable);
@@ -208,7 +201,7 @@ public class BoxShadowUtil {
     }
   }
 
-  private static void setInsetBoxShadow(View target, BoxShadowOptions options) {
+  private static void setInsetBoxShadow(View target, BoxShadowOptions options, float quality) {
     if (target == null || options == null) {
       WXLogUtils.w(TAG, "Illegal arguments");
       return;
@@ -289,13 +282,17 @@ public class BoxShadowUtil {
   }
 
   private static class OverflowBitmapDrawable extends BitmapDrawable {
-    int paddingX;
-    int paddingY;
+    private int paddingX;
+    private int paddingY;
+    private BoxShadowOptions options;
 
-    private OverflowBitmapDrawable(Resources resources, Bitmap bitmap, int paddingX, int paddingY) {
+    private OverflowBitmapDrawable(Resources resources, Bitmap bitmap, BoxShadowOptions options) {
       super(resources, bitmap);
-      this.paddingX = paddingX;
-      this.paddingY = paddingY;
+      this.paddingX = (int) (options.blur + Math.abs(options.hShadow) + options.spread);
+      this.paddingY = (int) (options.blur + Math.abs(options.vShadow) + options.spread);
+      this.options = options;
+
+      setBounds(-paddingX, -paddingY, options.viewWidth + paddingX, options.viewHeight + paddingY);
     }
 
     @Override
@@ -304,6 +301,13 @@ public class BoxShadowUtil {
       // Make the Canvas Rect bigger according to the padding.
       newRect.inset(-paddingX * 2, -paddingY * 2);
       canvas.clipRect(newRect, Region.Op.REPLACE);
+
+      Path contentPath = new Path();
+      RectF rectF = new RectF(0f, 0f, options.viewWidth, options.viewHeight);
+      contentPath.addRoundRect(rectF, options.radii, Path.Direction.CCW);
+      // can not antialias
+      canvas.clipPath(contentPath, Region.Op.DIFFERENCE);
+
       super.draw(canvas);
     }
   }
@@ -431,12 +435,12 @@ public class BoxShadowUtil {
     }
 
     @Override
-    public void setAlpha(int alpha) {
+    public void setAlpha(@IntRange(from = 0, to = 255) int alpha) {
 
     }
 
     @Override
-    public void setColorFilter(ColorFilter cf) {
+    public void setColorFilter(@Nullable ColorFilter colorFilter) {
 
     }
 
@@ -459,6 +463,8 @@ public class BoxShadowUtil {
     public boolean isInset = false;
 
     public boolean isClear = false;
+    public int viewWidth = 0;
+    public int viewHeight = 0;
 
     private BoxShadowOptions(int vp) {
       if (viewport != 0) {
@@ -491,6 +497,28 @@ public class BoxShadowUtil {
       optionParamParsers.add(spreadParser);
     }
 
+    public BoxShadowOptions scale(float scale) {
+      if (scale > 0f && scale <= 1f) {
+        BoxShadowOptions scaledOptions = new BoxShadowOptions(viewport);
+        scaledOptions.hShadow = hShadow * scale;
+        scaledOptions.vShadow = vShadow * scale;
+        scaledOptions.blur = blur * scale;
+        scaledOptions.spread = spread * scale;
+        for (int i = 0; i < radii.length ; i++) {
+          scaledOptions.radii[i] = radii[i] * scale;
+        }
+        scaledOptions.viewHeight = (int) (viewHeight * scale);
+        scaledOptions.viewWidth = (int) (viewWidth * scale);
+
+        scaledOptions.color = color;
+        scaledOptions.isInset = isInset;
+        scaledOptions.isClear = isClear;
+        WXLogUtils.d(TAG, "Scaled BoxShadowOptions: [" + scale + "] " + scaledOptions);
+        return scaledOptions;
+      }
+      return null;
+    }
+
     @Override
     public String toString() {
 


[16/18] incubator-weex git commit: * [android] add border-android.png

Posted by gu...@apache.org.
* [android] add border-android.png


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

Branch: refs/heads/release-0.16
Commit: f549f70fe1b65d2d3ed194c446e93ba2707d3e73
Parents: 84f0390
Author: misakuo <mi...@apache.org>
Authored: Mon Oct 23 14:47:31 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Mon Oct 23 14:47:31 2017 +0800

----------------------------------------------------------------------
 test/screenshot/border-android.png | Bin 0 -> 164417 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f549f70f/test/screenshot/border-android.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-android.png b/test/screenshot/border-android.png
new file mode 100644
index 0000000..166a287
Binary files /dev/null and b/test/screenshot/border-android.png differ


[13/18] incubator-weex git commit: Revert: * [android] modify border-android.png

Posted by gu...@apache.org.
Revert: * [android] modify border-android.png


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

Branch: refs/heads/release-0.16
Commit: bdcc5356b3bdf8d5238296a4f8e1a68bdd598da2
Parents: 28dd9f3
Author: misakuo <mi...@apache.org>
Authored: Mon Oct 23 14:38:44 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Mon Oct 23 14:38:44 2017 +0800

----------------------------------------------------------------------
 .github/PULL_REQUEST_TEMPLATE.md                |    4 +-
 .travis.yml                                     |    4 +
 CONTRIBUTING.md                                 |   22 +-
 .../java/com/alibaba/weex/IndexActivity.java    |   12 +
 android/sdk/build.gradle                        |    1 -
 android/sdk/libs/armeabi/libweexjsb.so          |  Bin 22620 -> 22620 bytes
 android/sdk/libs/armeabi/libweexjsc.so          |  Bin 335324 -> 338160 bytes
 android/sdk/libs/armeabi/libweexjss.so          |  Bin 6754016 -> 6754016 bytes
 android/sdk/libs/armeabi/libweexjst.so          |  Bin 22552 -> 0 bytes
 android/sdk/libs/x86/libweexjsc.so              |  Bin 12126020 -> 12121924 bytes
 .../main/java/com/taobao/weex/WXSDKEngine.java  |   13 -
 .../java/com/taobao/weex/bridge/WXBridge.java   |   17 -
 .../com/taobao/weex/bridge/WXBridgeManager.java | 1019 +++++++++---------
 .../java/com/taobao/weex/common/Constants.java  |    3 -
 .../java/com/taobao/weex/common/IWXBridge.java  |    9 -
 .../java/com/taobao/weex/dom/WXDomObject.java   |    4 +-
 .../dom/action/AbstractAddElementAction.java    |    4 +-
 .../weex/dom/action/MoveElementAction.java      |    3 -
 .../ui/component/AbstractEditComponent.java     |    8 -
 .../taobao/weex/ui/component/WXComponent.java   |    4 +-
 .../weex/ui/component/WXComponentFactory.java   |    2 +
 .../com/taobao/weex/ui/component/WXImage.java   |   10 -
 .../taobao/weex/ui/component/WXScroller.java    |    2 +-
 .../com/taobao/weex/ui/component/WXSlider.java  |    2 +-
 .../weex/ui/component/WXSliderNeighbor.java     |    2 +-
 .../taobao/weex/ui/component/WXVContainer.java  |    6 +-
 .../ui/component/list/BasicListComponent.java   |  116 +-
 .../ui/component/list/StickyHeaderHelper.java   |   43 +-
 .../taobao/weex/ui/component/list/WXCell.java   |   68 +-
 .../list/template/WXRecyclerTemplateList.java   |    4 +-
 .../weex/ui/view/listview/WXRecyclerView.java   |   24 +-
 .../java/com/taobao/weex/utils/WXLogUtils.java  |   30 +-
 .../taobao/weex/utils/WXSoInstallMgrSdk.java    |   69 --
 .../java/com/taobao/weex/utils/WXViewUtils.java |   25 +-
 .../com/taobao/weex/utils/WXLogUtilsTest.java   |   16 +-
 .../java/com/taobao/weex/utils/WXUtilsTest.java |    3 +-
 .../taobao/weex/bridge/WXWebsocketBridge.java   |   15 -
 dangerfile.js                                   |   47 +-
 doc/source/cn/guide/contributing.md             |   27 +-
 doc/source/guide/contributing.md                |   26 +-
 doc/source/references/platform-difference.md    |   11 -
 doc/source/references/platfrom-difference.md    |   11 +
 .../references/vue/difference-with-web.md       |    2 +-
 doc/themes/weex/layout/_partial/article.ejs     |    2 -
 doc/themes/weex/layout/index.ejs                |    3 -
 doc/themes/weex/layout/layout.ejs               |    2 +
 doc/themes/weex/source/css/common.scss          |    4 +-
 doc/themes/weex/source/css/partial/header.scss  |    2 +-
 doc/themes/weex/source/css/post.scss            |    7 +-
 doc/themes/weex/source/css/variable.scss        |    2 +-
 html5/runtime/api/WeexInstance.js               |  126 ---
 html5/runtime/api/component.js                  |   51 -
 html5/runtime/api/init.js                       |  107 +-
 html5/runtime/api/module.js                     |   56 -
 html5/runtime/vdom/Element.js                   |    2 +-
 ios/sdk/WeexSDK.xcodeproj/project.pbxproj       |   12 -
 .../WeexSDK/Sources/Bridge/WXBridgeContext.m    |   13 +-
 ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m |   16 +-
 .../Sources/Component/WXCycleSliderComponent.m  |    2 +-
 .../Sources/Component/WXScrollerComponent.m     |   31 +-
 .../WeexSDK/Sources/Component/WXWebComponent.m  |    3 -
 .../Sources/Display/WXComponent+BoxShadow.m     |    9 +-
 ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m    |    5 +-
 ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h     |    6 -
 .../WeexSDK/Sources/Monitor/WXExceptionUtils.h  |   29 -
 .../WeexSDK/Sources/Monitor/WXExceptionUtils.m  |   57 -
 ios/sdk/WeexSDK/Sources/WeexSDK.h               |    1 -
 pre-build/native-bundle-main.js                 |   16 +-
 test/screenshot/border-android.png              |  Bin 164417 -> 0 bytes
 test/screenshot/border-ios.png                  |  Bin 129071 -> 128088 bytes
 70 files changed, 758 insertions(+), 1494 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/.github/PULL_REQUEST_TEMPLATE.md
----------------------------------------------------------------------
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index fea8dd9..0a6fb20 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -48,13 +48,13 @@ Thank you for your support.
 
 <!--
 (请在***提交***前删除这段描述)
-It's ***RECOMMENDED*** to submit typo fix, new demo, tiny bugfix and large feature to `master` branch.
+It's ***RECOMMENDED*** to submit typo fix, new demo and tiny bugfix to `master` branch. New feature and other modifications can be submitted to "domain" branch including `ios`, `android`, `jsfm`, `html5`.
     
 See [Branch Strategy](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-management) for more detail.
 
 ----
 
-错别字修改、新 demo、较小的 bugfix、甚至较大的功能都可以直接提到 `master` 分支;
+错别字修改、新 demo、较小的 bugfix 都可以直接提到 `master` 分支;新需求以及任何你不确定影响面的改动,请提交到对应“领域”的分支(`ios`、`android`、`jsfm`、`html5`)。
 
 查看完整的[分支策略 (英文)](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-management)。
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 95624a6..a7bca6f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,6 +20,10 @@ matrix:
       - os: linux
         env: TEST_SUITE=android
     include:
+      - os: osx
+        env: TEST_SUITE=ios
+        osx_image: xcode8.1
+        language: objective-c
       - os: linux
         env: TEST_SUITE=android
         jdk: oraclejdk8

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e18f8de..e30a65c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -19,21 +19,21 @@ Besides Weex dev mailing list, we also have some other mailing lists for you. Yo
 ```
 release
  ↑
-{version}
- ↑
-master         <--- PR(feature/hotfix/typo)
+master         <--- PR(hotfix/typo/3rd-PR)
+ ↑ PR
+{domain}-feature-{point}
 ```
 
-0. `master` branch
-    0. `master` is the stable developing branch.
-    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `master `***.
-0. `{version}` branch
-    0. `{version}` is used for every version which we consider for stable publish.
-    0. e.g. `v0.16`
 0. `release` branch
-    0. `release` is the latest release branch,we will make tag and publish version on this branch.
+    0. `release ` is the latest release branch.
+0. `master ` branch
+    0. `master ` is the stable developing branch.
+    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `master `***.
+0. `{domain}-feature-{point}` branch
+    0. The branch for a developing iteration, e.g. `android-feature-list-update` is an android developing iteration which is for list update. `{domain}` consists of `android`, `ios`, `jsfm` and `html5`. 
+    0. **DO NOT commit any PR to such a branch**.
 
-### Branch Name For PR
+### Branch Name 
 
 ```
 {module}-{action}-{shortName}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java
----------------------------------------------------------------------
diff --git a/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java b/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java
index 0603363..866733a 100644
--- a/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java
+++ b/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java
@@ -103,6 +103,18 @@ public class IndexActivity extends AbstractWeexActivity {
     };
 
     LocalBroadcastManager.getInstance(this).registerReceiver(mReloadReceiver, new IntentFilter(WXSDKEngine.JS_FRAMEWORK_RELOAD));
+
+    requestWeexPermission();
+  }
+
+  private void requestWeexPermission() {
+    if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
+      if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
+        Toast.makeText(this, "please give me the permission", Toast.LENGTH_SHORT).show();
+      } else {
+        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_PERMISSION_REQUEST_CODE);
+      }
+    }
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/build.gradle
----------------------------------------------------------------------
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index a49a05f..0be69fb 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -127,7 +127,6 @@ android {
         targetCompatibility JavaVersion.VERSION_1_7
     }
     testOptions {
-        unitTests.returnDefaultValues = true
         unitTests.all {
             maxHeapSize = "1024m"
             jvmArgs += ['-XX:-UseSplitVerifier', '-noverify','-Xverify:none']/* fix VerifyError  */

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/libs/armeabi/libweexjsb.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjsb.so b/android/sdk/libs/armeabi/libweexjsb.so
index cb739b4..4b13b06 100755
Binary files a/android/sdk/libs/armeabi/libweexjsb.so and b/android/sdk/libs/armeabi/libweexjsb.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/libs/armeabi/libweexjsc.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjsc.so b/android/sdk/libs/armeabi/libweexjsc.so
index 7a9d85b..12f6df2 100755
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and b/android/sdk/libs/armeabi/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/libs/armeabi/libweexjss.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjss.so b/android/sdk/libs/armeabi/libweexjss.so
index 3efefa5..0187882 100755
Binary files a/android/sdk/libs/armeabi/libweexjss.so and b/android/sdk/libs/armeabi/libweexjss.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/libs/armeabi/libweexjst.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjst.so b/android/sdk/libs/armeabi/libweexjst.so
deleted file mode 100755
index 099256c..0000000
Binary files a/android/sdk/libs/armeabi/libweexjst.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/libs/x86/libweexjsc.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/x86/libweexjsc.so b/android/sdk/libs/x86/libweexjsc.so
index 3698a49..ab27aa9 100755
Binary files a/android/sdk/libs/x86/libweexjsc.so and b/android/sdk/libs/x86/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
index 3ea86e2..3a287cc 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
@@ -93,7 +93,6 @@ import com.taobao.weex.ui.module.WXMetaModule;
 import com.taobao.weex.ui.module.WXModalUIModule;
 import com.taobao.weex.ui.module.WXTimerModule;
 import com.taobao.weex.ui.module.WXWebViewModule;
-import com.taobao.weex.utils.LogLevel;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXSoInstallMgrSdk;
 import com.taobao.weex.utils.batch.BatchOperationHelper;
@@ -159,15 +158,6 @@ public class WXSDKEngine {
       }
       long start = System.currentTimeMillis();
       WXEnvironment.sSDKInitStart = start;
-      if(WXEnvironment.isApkDebugable()){
-        WXEnvironment.sLogLevel = LogLevel.DEBUG;
-      }else{
-		if(WXEnvironment.sApplication != null){
-		  WXEnvironment.sLogLevel = LogLevel.WARN;
-		}else {
-		  WXLogUtils.e(TAG,"WXEnvironment.sApplication is " + WXEnvironment.sApplication);
-		}
-      }
       doInitInternal(application,config);
       WXEnvironment.sSDKInitInvokeTime = System.currentTimeMillis()-start;
       WXLogUtils.renderPerformanceLog("SDKInitInvokeTime", WXEnvironment.sSDKInitInvokeTime);
@@ -177,9 +167,6 @@ public class WXSDKEngine {
 
   private static void doInitInternal(final Application application,final InitConfig config){
     WXEnvironment.sApplication = application;
-	if(application == null){
-	  WXLogUtils.e(TAG, " doInitInternal application is null");
-	}
     WXEnvironment.JsFrameworkInit = false;
 
     WXBridgeManager.getInstance().post(new Runnable() {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
index 9586f2a..9d88fc2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
@@ -36,8 +36,6 @@ class WXBridge implements IWXBridge {
 
   public static final String TAG = "WXBridge";
 
-  public static final boolean MULTIPROCESS = true;
-
   /**
    * Init JSFrameWork
    *
@@ -45,13 +43,6 @@ class WXBridge implements IWXBridge {
    */
   public native int initFramework(String framework, WXParams params);
 
-  /**
-   * Init JSFrameWork
-   *
-   * @param framework assets/main.js
-   */
-  public native int initFramework(String framework, WXParams params, String cacheDir, boolean pieSupport);
-
 
   /**
    * Execute JavaScript function
@@ -77,14 +68,6 @@ class WXBridge implements IWXBridge {
    */
   public native void takeHeapSnapshot(String filename);
 
-
-  public int initFrameworkEnv(String framework, WXParams params, String cacheDir, boolean pieSupport){
-    if (MULTIPROCESS) {
-      return initFramework(framework, params, cacheDir, pieSupport);
-    } else {
-      return  initFramework(framework, params);
-    }
-  }
   /**
    * JavaScript uses this methods to call Android code
    *


[03/18] incubator-weex git commit: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/pre-build/native-bundle-main.js
----------------------------------------------------------------------
diff --git a/pre-build/native-bundle-main.js b/pre-build/native-bundle-main.js
index c5d06cf..fe65897 100644
--- a/pre-build/native-bundle-main.js
+++ b/pre-build/native-bundle-main.js
@@ -1,8 +1,8 @@
-(this.nativeLog||function(e){console.log(e)})("START JS FRAMEWORK 0.22.5, Build 2017-10-09 15:50."),this.getJSFMVersion=function(){return"0.22.5"};var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){qn.Document=e.Document,qn.Element=e.Element,qn.Comment=e.Comment,qn.sendTasks=e.sendTasks}function t(e,t,n,r,o){void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={});var i=new qn.Document(e,n.bundleUrl),a={},s={id:e,data:r,document:i,callbacks:a},u=0;i.addCallback=function(e){return u++,a[u]=e,u},i.handleCallback=function(e,t,n){var r=a[e];return n&&delete a[e],r(t)},zn[e]=s;var c=Object.assign({Document:qn.Document,Element:qn.Element,Comment:qn.Comment,sendTasks:function(t){return qn.sendTasks(e,t,-1)},options:n,document:i},o),l=[],f=[];for(var p in c)l.push(p),f.push(c[p]);return l.push(t),(new(Function.prototy
 pe.bind.apply(Function,[null].concat(l)))).apply(void 0,f),qn.sendTasks(e,[{module:"dom",method:"createFinish",args:[]}],-1),s}function n(e){delete zn[e]}function r(e){return zn[e].document.body.toJSON()}function o(e,t){var n={fireEvent:function(e,t,n,r,o){var i=zn[e],a=i.document,s=a.getRef(t);return a.fireEvent(s,n,r,o)},callback:function(e,t,n,r){return zn[e].document.handleCallback(t,n,r)}};if((zn[e]||{}).document&&Array.isArray(t)){var r=[];return t.forEach(function(t){var o=n[t.method],i=[].concat(t.args);"function"==typeof o&&(i.unshift(e),r.push(o.apply(void 0,i)))}),r}}function i(e){return e&&e.__esModule?e.default:e}function a(e,t){return t={exports:{}},e(t,t.exports),t.exports}function s(e){console.warn("[JS Framework] Vm#$ is deprecated, please use Vm#$vm instead");var t=this._ids[e];if(t)return t.vm}function u(e){var t=this._ids[e];if(t)return t.el}function c(e){var t=this._ids[e];if(t)return t.vm}function l(e){return this._app.differ.then(function(){e()})}function f(e,
 t){console.warn("[JS Framework] Vm#$scrollTo is deprecated, please use \"require('@weex-module/dom').scrollTo(el, options)\" instead");var n=this.$el(e);if(n){this._app.requireModule("dom").scrollToElement(n.ref,{offset:t})}}function p(e,t,n){var r=this,o=this.$el(e);if(o&&t&&t.styles){this._app.requireModule("animation").transition(o.ref,t,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];r._setStyle(o,t.styles),n&&n.apply(void 0,e)})}}function d(e){var t=this._app.options;return"function"==typeof e&&(console.warn("[JS Framework] the callback of Vm#$getConfig(callback) is deprecated, this api now can directly RETURN config info."),e(t)),t}function h(e,t){console.warn("[JS Framework] Vm#$sendHttp is deprecated, please use \"require('@weex-module/stream').sendHttp(params, callback)\" instead"),this._app.requireModule("stream").sendHttp(e,t)}function v(e){console.warn("[JS Framework] Vm#$openURL is deprecated, please use \"require('@weex-module/event').openURL(url)\" i
 nstead"),this._app.requireModule("event").openURL(e)}function y(e){console.warn("[JS Framework] Vm#$setTitle is deprecated, please use \"require('@weex-module/pageInfo').setTitle(title)\" instead"),this._app.requireModule("pageInfo").setTitle(e)}function m(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];console.warn("[JS Framework] Vm#$call is deprecated, please use \"require('@weex-module/moduleName')\" instead");var o=this._app.requireModule(e);o&&o[t]&&o[t].apply(o,n)}function _(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"==typeof Object.assign)Object.assign.apply(Object,[e].concat(t));else{var r=t.shift();for(var o in r)e[o]=r[o];t.length&&_.apply(void 0,[e].concat(t))}return e}function g(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function b(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function w(e,t){return fr.call(e,t)}function x(e,t){return function(n){var 
 r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}}function E(e){return null!==e&&"object"==typeof e}function O(e){return pr.call(e)===dr}function C(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function S(){return"object"==typeof nativeSet?nativeSet.create():new Bn}function k(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1).toLowerCase()}function j(e){return e.replace(vr,"").replace(yr,"")}function A(e){return e.replace(_r,"")}function I(){this.id=Er++,this.subs=[]}function T(e){I.target&&Or.push(I.target),I.target=e}function N(){I.target=Or.pop()}function P(){I.target=null,Or=[]}function M(e,t,n,r){r&&_(this,r);var o="function"==typeof t;this.vm=e,e._watchers.push(this),this.expression=t,this.cb=n,this.id=++Cr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=S(),this.newDepIds=S(),o&&(this.getter=t),this.value=this.lazy?void 0:this.get(),this.queued=this.shallow=!1}function $(e,t){var n,r,o,i;if(
 t||(t=Sr,t.clear()),o=Array.isArray(e),i=E(e),o||i){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(o)for(n=e.length;n--;)$(e[n],t);else if(i)for(r=Object.keys(e),n=r.length;n--;)$(e[r[n]],t)}}function R(e){if(this.value=e,this.dep=new I,g(e,"__ob__",this),Array.isArray(e)){(hr?D:F)(e,jr,Ar),this.observeArray(e)}else this.walk(e)}function D(e,t){e.__proto__=t}function F(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];g(e,i,t[i])}}function L(e,t){if(E(e)){var n;return w(e,"__ob__")&&e.__ob__ instanceof R?n=e.__ob__:(Array.isArray(e)||O(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new R(e)),n&&t&&n.addVm(t),n}}function W(e,t,n){var r=new I,o=Object.getOwnPropertyDescriptor(e,t);if(!o||!1!==o.configurable){var i=o&&o.get,a=o&&o.set,s=L(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=i?i.call(e):n;if(I.target&&(r.depend(),s&&s.dep.depend(),Array.isArray(t)))for(var o=void 0,a=0,u=t.length;a<u;a++)(o=t[a])&&o.__ob__&&o.__ob__.dep.depend(
 );return t},set:function(t){t!==(i?i.call(e):n)&&(a?a.call(e,t):n=t,s=L(t),r.notify())}})}}function U(e,t,n){if(Array.isArray(e))return e.splice(t,1,n);if(w(e,t))return void(e[t]=n);if(e._isVue)return void U(e._data,t,n);var r=e.__ob__;if(!r)return void(e[t]=n);if(r.convert(t,n),r.dep.notify(),r.vms)for(var o=r.vms.length;o--;){var i=r.vms[o];B(i,t)}return n}function V(e,t){if(w(e,t)){delete e[t];var n=e.__ob__;if(!n)return void(e._isVue&&delete e._data[t]);if(n.dep.notify(),n.vms)for(var r=n.vms.length;r--;){var o=n.vms[r];q(o,t)}}}function B(e,t){(Ir.indexOf(t)>-1||!C(t))&&Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return e._data[t]},set:function(n){e._data[t]=n}})}function q(e,t){C(t)||delete e[t]}function z(e){e._watchers=[],J(e),G(e),K(e)}function J(e){var t=e._data;O(t)||(t={});for(var n=Object.keys(t),r=n.length;r--;)B(e,n[r]);L(t,e)}function H(){}function G(e){var t=e._computed;if(t)for(var n in t){var r=t[n],o={enumerable:!0,configurable:!0};"fu
 nction"==typeof r?(o.get=X(r,e),o.set=H):(o.get=r.get?!1!==r.cache?X(r.get,e):x(r.get,e):H,o.set=r.set?x(r.set,e):H),Object.defineProperty(e,n,o)}}function X(e,t){var n=new M(t,e,null,{lazy:!0});return function(){return n.dirty&&n.evaluate(),I.target&&n.depend(),n.value}}function K(e){var t=e._methods;if(t)for(var n in t)e[n]=t[n]}function Z(e){var t=e.type,n=Nr[t];if("object"==typeof n)for(var r in n)if(null==e[r])e[r]=n[r];else if("object"===k(e[r])&&"object"===k(n[r]))for(var o in n[r])null==e[r][o]&&(e[r][o]=n[r][o])}function Q(e,t,n){oe(e,t,n.id,e),ie(e,t,n.attr),se(e,t,n.classList),ue(e,t,n.style),le(e,t,n.events)}function Y(e,t,n,r){t=t||{},n=n||{};var o=t._options||{},i=o.props;Array.isArray(i)&&(i=i.reduce(function(e,t){return e[t]=!0,e},{})),te(r,i,e,t),te(n.attr,i,e,t)}function ee(e,t,n,r){void 0===r&&(r={}),re(n.classList,e,t),ne(n.style,e,t),r.children?r.children[r.children.length-1]._vm=t:r._vm=t}function te(e,t,n,r){if(e){for(var o in e)!function(o){if(!t||t[o]){var i
 =e[o];if("function"==typeof i){var a=de(n,i,function(e){r[o]=e});r[o]=a}else r[o]=i}}(o)}}function ne(e,t,n){for(var r in e)!function(r){var o=e[r];if("function"==typeof o){var i=de(t,o,function(e){n._rootEl&&n._rootEl.setStyle(r,e)});n._rootEl.setStyle(r,i)}else n._rootEl&&n._rootEl.setStyle(r,o)}(r)}function re(e,t,n){function r(e,t){"array"===k(e)&&e.unshift(t)}var o=t._options&&t._options.style||{};if(n._rootEl){var i="@originalRootEl";if(o[i]=n._rootEl.classStyle,"function"==typeof e){var a=de(t,e,function(e){r(e,i),ae(n._rootEl,o,e)});r(a,i),ae(n._rootEl,o,a)}else null!=e&&(r(e,i),ae(n._rootEl,o,e))}}function oe(e,t,n,r){var o=Object.create(null);if(Object.defineProperties(o,{vm:{value:r,writable:!1,configurable:!1},el:{get:function(){return t||r._rootEl},configurable:!1}}),"function"==typeof n){var i=n;n=i.call(e),(n||0===n)&&(e._ids[n]=o),de(e,i,function(t){t&&(e._ids[t]=o)})}else n&&"string"==typeof n&&(e._ids[n]=o)}function ie(e,t,n){fe(e,t,"attr",n)}function ae(e,t,n){"st
 ring"==typeof n&&(n=n.split(/\s+/)),n.forEach(function(e,t){n.splice.apply(n,[t,1].concat(e.split(/\s+/)))});for(var r={},o=n.length,i=0;i<o;i++)!function(e){var o=t[n[e]];o&&Object.keys(o).forEach(function(e){r[e]=o[e]})}(i);e.setClassStyle(r)}function se(e,t,n){if("function"==typeof n||Array.isArray(n)){if(Array.isArray(n)&&!n.length)return void t.setClassStyle({});var r=e._options&&e._options.style||{};if("function"==typeof n){var o=de(e,n,function(e){ae(t,r,e)});ae(t,r,o)}else ae(t,r,n)}}function ue(e,t,n){fe(e,t,"style",n)}function ce(e,t,n,r){t.addEvent(n,x(r,e))}function le(e,t,n){if(n)for(var r=Object.keys(n),o=r.length;o--;){var i=r[o],a=n[i];"string"==typeof a&&((a=e[a])||console.warn('[JS Framework] The event handler "'+a+'" is not defined.')),ce(e,t,i,a)}}function fe(e,t,n,r){if(r)for(var o=Object.keys(r),i=o.length;i--;){var a=o[i],s=r[a];"function"==typeof s?pe(e,t,n,a,s):t[Pr[n]](a,s)}}function pe(e,t,n,r,o){var i=Pr[n],a=de(e,o,function(n){function o(){t[i](r,n)}var 
 a=e&&e._app&&e._app.differ;a?a.append("element",t.depth||0,t.ref,o):o()});t[i](r,a)}function de(e,t,n){return e._static?t.call(e,e):new M(e,t,function(e,t){"object"!=typeof e&&e===t||n(e)}).value}function he(e,t){return e._app.doc.createBody(t)}function ve(e,t){return e._app.doc.createElement(t)}function ye(e,t){var n=me(e),r=_e(e),o=Mr++;if(t.element){var i=t.updateMark;i?(i.element&&(i=i.end),t.element.insertAfter(r,i),t.element.insertAfter(n,i),t.updateMark=r):(t.element.insertBefore(n,t.end),t.element.insertBefore(r,t.end)),t=t.element}else t.appendChild(n),t.appendChild(r);return{start:n,end:r,element:t,blockId:o}}function me(e){return e._app.doc.createComment("start")}function _e(e){return e._app.doc.createComment("end")}function ge(e,t,n){if(n.element){var r=n.end,o=n.updateMark;if(n.children&&n.children.push(t),o){var i=be(e,t,o);return n.updateMark=t.element?t.end:t,i}if(!t.element)return n.element.insertBefore(t,r);n.element.insertBefore(t.start,r),n.element.insertBefore(t
 .end,r)}else{if(!t.element)return n.appendChild(t);n.appendChild(t.start),n.appendChild(t.end)}}function be(e,t,n){return t.element?xe(t,n):we(t,n)}function we(e,t){var n=t.parentNode;if(n)return n.insertAfter(e,t)}function xe(e,t){var n=t.parentNode;if(n){for(var r,o=e.start,i=[o];o&&o!==e.end;)o=o.nextSibling,i.push(o);var a=t;return i.every(function(e){return r=n.insertAfter(e,a),a=e,-1!==r}),r}}function Ee(e,t,n){void 0===n&&(n=!1),t.element?Ce(t,n):Oe(t),t._vm&&t._vm.$emit("hook:destroyed")}function Oe(e){var t=e.parentNode;t&&t.removeChild(e)}function Ce(e,t){void 0===t&&(t=!1);for(var n=[],r=e.start.nextSibling;r&&r!==e.end;)n.push(r),r=r.nextSibling;t||Oe(e.start),n.forEach(function(e){Oe(e)}),t||Oe(e.end)}function Se(e){var t=e._options||{},n=t.template||{};t.replace?n.children&&1===n.children.length?ke(e,n.children[0],e._parentEl):ke(e,n.children,e._parentEl):ke(e,n,e._parentEl),console.debug('[JS Framework] "ready" lifecycle in Vm('+e._type+")"),e.$emit("hook:ready"),e._r
 eady=!0}function ke(e,t,n,r){if(-1!==(e._app||{}).lastSignal){if(t.attr&&t.attr.hasOwnProperty("static")&&(e._static=!0),je(t))return void Me(e,t,n,r);if(r=r||{},Ae(t))return console.debug('[JS Framework] compile "content" block by',t),void(e._content=ye(e,n));if(Ie(t,r))return console.debug('[JS Framework] compile "repeat" logic by',t),void("document"===n.type?console.warn("[JS Framework] The root element does't support `repeat` directive!"):$e(e,t,n));if(Te(t,r))return console.debug('[JS Framework] compile "if" logic by',t),void("document"===n.type?console.warn("[JS Framework] The root element does't support `if` directive!"):Re(e,t,n,r));var o=r.type||t.type;if(Ne(o,r))return void De(e,t,n,o,r);var i=o,a=Pe(e,t,i);if(a)return console.debug("[JS Framework] compile composed component by",t),void Fe(e,a,t,n,i,r);console.debug("[JS Framework] compile native component by",t),Le(e,t,n,i)}}function je(e){return Array.isArray(e)}function Ae(e){return"content"===e.type||"slot"===e.type}fu
 nction Ie(e,t){return!t.hasOwnProperty("repeat")&&e.repeat}function Te(e,t){return!t.hasOwnProperty("shown")&&e.shown}function Ne(e,t){return"function"==typeof e&&!t.hasOwnProperty("type")}function Pe(e,t,n){var r;return e._app&&e._app.customComponentMap&&(r=e._app.customComponentMap[n]),e._options&&e._options.components&&(r=e._options.components[n]),t.component&&(r=r||{}),r}function Me(e,t,n,r){var o=ye(e,n);t.forEach(function(t){ke(e,t,o,r)})}function $e(e,t,n){var r=t.repeat,o="function"==typeof r,i=r.getter||r.expression||r;"function"!=typeof i&&(i=function(){return[]});var a=r.key||"$index",s=r.value||"$value",u=r.trackBy||t.trackBy||t.attr&&t.attr.trackBy,c=ye(e,n);c.children=[],c.data=[],c.vms=[],Ue(e,t,c,{getter:i,key:a,value:s,trackBy:u,oldStyle:o})}function Re(e,t,n,r){var o={shown:!0},i=ye(e,n);n.element&&n.children&&n.children.push(i),r.repeat&&(o.repeat=r.repeat),Ve(e,t,i,o)}function De(e,t,n,r,o){var i=r.call(e),a=_({type:i},o),s=ye(e,n);n.element&&n.children&&n.childr
 en.push(s),de(e,r,function(n){var r=_({type:n},o);Ee(e,s,!0),ke(e,t,s,r)}),ke(e,t,s,a)}function Fe(e,t,n,r,o,i){var a=e.constructor,s=new a(o,t,e,r,void 0,{"hook:init":function(){e._static&&(this._static=e._static),oe(e,null,n.id,this),this._externalBinding={parent:e,template:n}},"hook:created":function(){Y(e,this,n,i.repeat)},"hook:ready":function(){this._content&&We(e,n,this._content)}});ee(e,s,n,r)}function Le(e,t,n,r){Z(t);var o;if("_documentElement"===n.ref?(console.debug("[JS Framework] compile to create body for "+r),o=he(e,r)):(console.debug("[JS Framework] compile to create element for "+r),o=ve(e,r)),!e._rootEl){e._rootEl=o;var i=e._externalBinding||{},a=i.template,s=i.parent;if(a&&a.events&&s&&o)for(var u in a.events){var c=s[a.events[u]];c&&o.addEvent(u,x(c,s))}}Q(e,o,t),t.attr&&t.attr.append&&(t.append=t.attr.append),t.append&&(o.attr=o.attr||{},o.attr.append=t.append);var l="tree"===t.append,f=e._app||{};-1===f.lastSignal||l||(console.debug("[JS Framework] compile to a
 ppend single node for",o),f.lastSignal=ge(e,o,n)),-1!==f.lastSignal&&We(e,t,o),-1!==f.lastSignal&&l&&(console.debug("[JS Framework] compile to append whole tree for",o),f.lastSignal=ge(e,o,n))}function We(e,t,n){var r=e._app||{},o=t.children;o&&o.length&&o.every(function(t){return ke(e,t,n),-1!==r.lastSignal})}function Ue(e,t,n,r){function o(e,r,o){var a;c?(a=e,E(e)?(a[l]=r,a.hasOwnProperty("INDEX")||Object.defineProperty(a,"INDEX",{value:function(){console.warn('[JS Framework] "INDEX" in repeat is deprecated, please use "$index" instead')}})):(console.warn("[JS Framework] Each list item must be an object in old-style repeat, please use `repeat={{v in list}}` instead."),a={},a[l]=r,a[f]=e)):(a={},a[l]=r,a[f]=e);var s=qe(o,a);i.push(s),ke(s,t,n,{repeat:e})}var i=n.vms,a=n.children,s=r.getter,u=r.trackBy,c=r.oldStyle,l=r.key,f=r.value,p=Be(e,n,s,"repeat",function(t){if(console.debug('[JS Framework] the "repeat" item has changed',t),n&&t){var r=a.slice(),s=i.slice(),p=n.data.slice(),d=
 {},h={};t.forEach(function(e,t){var n=u?e[u]:c?e[l]:t;null!=n&&""!==n&&(d[n]=e)});var v=[];p.forEach(function(t,n){var o=u?t[u]:c?t[l]:n;d.hasOwnProperty(o)?(h[o]={item:t,index:n,key:o,target:r[n],vm:s[n]},v.push(t)):Ee(e,r[n])}),a.length=0,i.length=0,n.data=t.slice(),n.updateMark=n.start,t.forEach(function(t,r){var s=u?t[u]:c?t[l]:r,p=h[s];p?(p.item===v[0]?v.shift():(v.$remove(p.item),be(e,p.target,n.updateMark,!0)),a.push(p.target),i.push(p.vm),c?p.vm=t:p.vm[f]=t,p.vm[l]=r,n.updateMark=p.target):o(t,r,e)}),delete n.updateMark}});n.data=p.slice(0),p.forEach(function(t,n){o(t,n,e)})}function Ve(e,t,n,r){var o=Be(e,n,t.shown,"shown",function(o){console.debug('[JS Framework] the "if" item was changed',o),n&&!!n.display!=!!o&&(n.display=!!o,o?ke(e,t,n,r):Ee(e,n,!0))});n.display=!!o,o&&ke(e,t,n,r)}function Be(e,t,n,r,o){var i=e&&e._app&&e._app.differ,a={},s=(t.element.depth||0)+1;return de(e,n,function(e){a.latestValue=e,i&&!a.recorded&&i.append(r,s,t.blockId,function(){var e=a.latestVa
 lue;o(e),a.recorded=!1,a.latestValue=void 0}),a.recorded=!0})}function qe(e,t){var n=Object.create(e);return n._data=t,J(n),G(n),n._realParent=e,e._static&&(n._static=e._static),n}function ze(e,t){if(t instanceof ze)return t;this.timestamp=Date.now(),this.detail=t,this.type=e;var n=!1;this.stop=function(){n=!0},this.hasStopped=function(){return n}}function Je(e,t){var n=this,r=this._vmEvents,o=r[e];if(o){var i=new ze(e,t);o.forEach(function(e){e.call(n,i)})}}function He(e,t){var n=new ze(e,t);this.$emit(e,n),!n.hasStopped()&&this._parent&&this._parent.$dispatch&&this._parent.$dispatch(e,n)}function Ge(e,t){var n=new ze(e,t);this.$emit(e,n),!n.hasStopped()&&this._childrenVms&&this._childrenVms.forEach(function(t){t.$broadcast(e,n)})}function Xe(e,t){if(e&&"function"==typeof t){var n=this._vmEvents,r=n[e]||[];r.push(t),n[e]=r,"hook:ready"===e&&this._ready&&this.$emit("hook:ready")}}function Ke(e,t){if(e){var n=this._vmEvents;if(!t)return void delete n[e];var r=n[e];r&&r.$remove(t)}}fu
 nction Ze(e,t){var n=e._options||{},r=n.events||{};for(var o in r)e.$on(o,r[o]);for(var i in t)e.$on(i,t[i]);$r.forEach(function(t){e.$on("hook:"+t,n[t])})}function Qe(e,t,n,r,o,i){n=n||{},this._parent=n._realParent?n._realParent:n,this._app=n._app||{},n._childrenVms&&n._childrenVms.push(this),!t&&this._app.customComponentMap&&(t=this._app.customComponentMap[e]),t=t||{};var a=t.data||{};this._options=t,this._methods=t.methods||{},this._computed=t.computed||{},this._css=t.style||{},this._ids={},this._vmEvents={},this._childrenVms=[],this._type=e,Ze(this,i),console.debug('[JS Framework] "init" lifecycle in Vm('+this._type+")"),this.$emit("hook:init"),this._inited=!0,this._data="function"==typeof a?a():a,o&&_(this._data,o),z(this),console.debug('[JS Framework] "created" lifecycle in Vm('+this._type+")"),this.$emit("hook:created"),this._created=!0,t.methods&&t.methods.ready&&(console.warn('"exports.methods.ready" is deprecated, please use "exports.created" instead'),t.methods.ready.call
 (this)),this._app.doc&&(this._parentEl=r||this._app.doc.documentElement,Se(this))}function Ye(e,t){for(var n in e)!function(n){var r=Rr[n];r||(r={},Rr[n]=r),e[n].forEach(function(e){"string"==typeof e&&(e={name:e}),r[e.name]&&!t||(r[e.name]=e)})}(n)}function et(e,t){var n=e.prototype;for(var r in t)n.hasOwnProperty(r)||(n[r]=t[r])}function tt(e,t){var n=Rr[t],r={};for(var o in n)!function(n){Object.defineProperty(r,n,{configurable:!0,enumerable:!0,get:function(){return function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return e.callTasks({module:t,method:n,args:r})}},set:function(r){if("function"==typeof r)return e.callTasks({module:t,method:n,args:[r]})}})}(o);return r}function nt(e,t){return e.customComponentMap[t]}function rt(e,t,n){var r=e.customComponentMap;if(r[t])return void console.error("[JS Framework] define a component("+t+") that already exists");r[t]=n}function ot(e){if(Dr.valid(e))return e;e="string"==typeof e?e:"";for(var t=e.split("."),n=0,r=[];n<3;){v
 ar o="string"==typeof t[n]&&t[n]?t[n]:"0";r.push(o),n++}return r.join(".")}function it(e,t,n){var r={isDowngrade:!0,errorType:1,code:1e3},o=e.toLowerCase();return r.errorMessage=function(e,t,n){return"Downgrade["+e+"] :: deviceInfo "+t+" matched criteria "+n}(e,t,n),o.indexOf("osversion")>=0?r.code=1001:o.indexOf("appversion")>=0?r.code=1002:o.indexOf("weexversion")>=0?r.code=1003:o.indexOf("devicemodel")>=0&&(r.code=1004),r}function at(e,t){t=t||global.WXEnvironment,t=O(t)?t:{};var n={isDowngrade:!1};if("function"===k(e)){var r=e.call(this,t,{semver:Dr,normalizeVersion:ot});r=!!r,n=r?it("custom","","custom params"):n}else{e=O(e)?e:{};var o=t.platform||"unknow",i=o.toLowerCase(),a=e[i]||{};for(var s in t){var u=s,c=u.toLowerCase(),l=t[s],f=c.indexOf("version")>=0,p=c.indexOf("devicemodel")>=0,d=a[s];if(d&&f){var h=ot(d),v=ot(t[s]);if(Dr.satisfies(v,h)){n=it(u,l,d);break}}else if(p){var y="array"===k(d)?d:[d];if(y.indexOf(l)>=0){n=it(u,l,d);break}}}}return n}function st(e,t){if(void 
 0===t&&(t={}),e&&e.callTasks)return e.callTasks([{module:"meta",method:"setViewport",args:[t]}])}function ut(e,t,n,r){console.debug("[JS Framework] bootstrap for "+t);var o;if(gr(t))o=j(t);else{if(!xr(t))return new Error("Wrong component name: "+t);if(o=A(t),!nt(e,o))return new Error("It's not a component: "+t)}if(n=O(n)?n:{},"string"==typeof n.transformerVersion&&"string"==typeof global.transformerVersion&&!Dr.satisfies(n.transformerVersion,global.transformerVersion))return new Error("JS Bundle version: "+n.transformerVersion+" not compatible with "+global.transformerVersion);var i=at(n.downgrade);if(i.isDowngrade)return e.callTasks([{module:"instanceWrap",method:"error",args:[i.errorType,i.code,i.errorMessage]}]),new Error("Downgrade["+i.code+"]: "+i.errorMessage);n.viewport&&st(e,n.viewport),e.vm=new Qe(o,null,{_app:e},null,r)}function ct(e,t,n){console.warn("[JS Framework] Register is deprecated, please install lastest transformer."),rt(e,t,n)}function lt(e,t){console.debug("[JS
  Framework] Refresh with",t,"in instance["+e.id+"]");var n=e.vm;return n&&t?("function"==typeof n.refreshData?n.refreshData(t):_(n,t),e.differ.flush(),void e.doc.taskCenter.send("dom",{action:"refreshFinish"},[])):new Error('invalid data "'+t+'"')}function ft(e){console.debug("[JS Framework] Destory an instance("+e.id+")"),e.vm&&pt(e.vm),e.id="",e.options=null,e.blocks=null,e.vm=null,e.doc.taskCenter.destroyCallback(),e.doc.destroy(),e.doc=null,e.customComponentMap=null,e.commonModules=null}function pt(e){if(delete e._app,delete e._computed,delete e._css,delete e._data,delete e._ids,delete e._methods,delete e._options,delete e._parent,delete e._parentEl,delete e._rootEl,e._watchers){for(var t=e._watchers.length;t--;)e._watchers[t].teardown();delete e._watchers}if(e._childrenVms){for(var n=e._childrenVms.length;n--;)pt(e._childrenVms[n]);delete e._childrenVms}console.debug('[JS Framework] "destroyed" lifecycle in Vm('+e._type+")"),e.$emit("hook:destroyed"),delete e._type,delete e._vm
 Events}function dt(e){var t=e.doc||{},n=t.body||{};return n.toJSON?n.toJSON():{}}function ht(e,t,n,r,o){if(console.debug('[JS Framework] Fire a "'+n+'" event on an element('+t+") in instance("+e.id+")"),Array.isArray(t))return void t.some(function(t){return!1!==ht(e,t,n,r)});var i=e.doc.getRef(t);if(i){var a=e.doc.fireEvent(i,n,r,o);return e.differ.flush(),e.doc.taskCenter.send("dom",{action:"updateFinish"},[]),a}return new Error('invalid element reference "'+t+'"')}function vt(e,t,n,r){console.debug("[JS Framework] Invoke a callback("+t+") with",n,"in instance("+e.id+")");var o=e.doc.taskCenter.callback(t,n,r);return yt(e),e.doc.taskCenter.send("dom",{action:"updateFinish"},[]),o}function yt(e){e.differ.flush()}function mt(e,t){var n;return"array"!==k(t)&&(t=[t]),t.forEach(function(t){n=e.doc.taskCenter.send("module",{module:t.module,method:t.method},t.args)}),n}function _t(e,t,n,r){console.debug("[JS Framework] Intialize an instance with:\n",n);var o,i=function(){for(var t=[],n=ar
 guments.length;n--;)t[n]=arguments[n];return Fr.apply(void 0,[e].concat(t))},a=function(t,r,i){o=ut(e,t,r,i||n),yt(e),e.doc.listener.createFinish(),console.debug("[JS Framework] After intialized an instance("+e.id+")")},s=Qe,u=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return ct.apply(void 0,[e].concat(t))},c=function(t,n){o=ut(e,t,{},n)},l=function(t){return function(n){o=ut(e,t,{},n)}},f=e.doc,p=function(t){return e.requireModule(j(t))},d={config:e.options,define:i,bootstrap:a,requireModule:p,document:f,Vm:s};Object.freeze(d);var h;"function"==typeof t?h=t.toString().substr(12):t&&(h=t.toString()),h='(function(global){\n\n"use strict";\n\n '+h+" \n\n})(Object.create(this))";var v=global.WXEnvironment,y={};if(v&&"Web"!==v.platform){var m=e.requireModule("timer");Object.assign(y,{setTimeout:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=function(){t[0].apply(t,t.slice(2))};return m.setTimeout(r,t[1]),e.doc.taskCenter.callbackManager.la
 stCallbackId.toString()},setInterval:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=function(){t[0].apply(t,t.slice(2))};return m.setInterval(r,t[1]),e.doc.taskCenter.callbackManager.lastCallbackId.toString()},clearTimeout:function(e){m.clearTimeout(e)},clearInterval:function(e){m.clearInterval(e)}})}var _=Object.assign({define:i,require:l,bootstrap:a,register:u,render:c,__weex_define__:i,__weex_bootstrap__:a,__weex_document__:f,__weex_require__:p,__weex_viewmodel__:s,weex:d},y,r);return bt(_,h)||gt(_,h),o}function gt(e,t){var n=[],r=[];for(var o in e)n.push(o),r.push(e[o]);return n.push(t),(new(Function.prototype.bind.apply(Function,[null].concat(n)))).apply(void 0,r)}function bt(e,t){if("function"!=typeof compileAndRunBundle)return!1;var n=void 0,r=!1,o="(function (",i=[],a=[];for(var s in e)i.push(s),a.push(e[s]);for(var u=0;u<i.length-1;++u)o+=i[u],o+=",";o+=i[i.length-1],o+=") {",o+=t,o+="} )";try{var c=e.weex||{},l=c.config||{};n=compileAndRunBundle(o,
 l.bundleUrl,l.bundleDigest,l.codeCachePath),n&&"function"==typeof n&&(n.apply(void 0,a),r=!0)}catch(e){console.error(e)}return r}function wt(e,t){var n=e[t];for(var r in n)n[r]()}function xt(e,t){var n=e[t];for(var r in n){n[r].forEach(function(e){e()})}}function Et(e,t){this.id=e,this.options=t||{},this.vm=null,this.customComponentMap={},this.commonModules={},this.doc=new Tr.Document(e,this.options.bundleUrl,null,Tr.Listener),this.differ=new Lr(e)}function Ot(e,t,n,r,o){var i=o||{},a=i.services;P();var s=Wr[e];n=n||{};var u;return s?u=new Error('invalid instance id "'+e+'"'):(s=new Et(e,n),Wr[e]=s,u=_t(s,t,r,a)),u instanceof Error?u:s}function Ct(e){Tr.Document=e.Document,Tr.Element=e.Element,Tr.Comment=e.Comment,Tr.sendTasks=e.sendTasks,Tr.Listener=e.Listener}function St(e,t){var n=Wr[e];return n?lt(n,t):new Error('invalid instance id "'+e+'"')}function kt(e){"function"==typeof markupState&&markupState(),P();var t=Wr[e];if(!t)return new Error('invalid instance id "'+e+'"');ft(t),d
 elete Wr[e];var n=Math.round(e);if(n>0){n%18||"function"!=typeof notifyTrimMemory||notifyTrimMemory()}return Wr}function jt(e){Array.isArray(e)&&e.forEach(function(e){e&&("string"==typeof e?Ur[e]=!0:"object"==typeof e&&"string"==typeof e.type&&(Ur[e.type]=e))})}function At(e){"object"==typeof e&&Ye(e)}function It(e){"object"==typeof e&&et(Qe,e)}function Tt(e,t){if(Wr[e]&&Array.isArray(t)){var n=[];return t.forEach(function(t){var r=Vr[t.method],o=[].concat(t.args);"function"==typeof r&&(o.unshift(e),n.push(r.apply(void 0,o)))}),n}return new Error('invalid instance id "'+e+'" or tasks')}function Nt(e){var t=Wr[e];return t?dt(t):new Error('invalid instance id "'+e+'"')}function Pt(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=qs(t),this.reject=qs(n)}function Mt(){if(Rt(),global.WXEnvironment&&"Web"!==global.WXEnvironment.platform)global.console={debug:function(){for(var e=[],t=arguments.length;t-
 -;)e[t]=arguments[t];Dt("debug")&&global.nativeLog.apply(global,Ft(e).concat(["__DEBUG"]))},log:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("log")&&global.nativeLog.apply(global,Ft(e).concat(["__LOG"]))},info:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("info")&&global.nativeLog.apply(global,Ft(e).concat(["__INFO"]))},warn:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("warn")&&global.nativeLog.apply(global,Ft(e).concat(["__WARN"]))},error:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("error")&&global.nativeLog.apply(global,Ft(e).concat(["__ERROR"]))}};else{var e=console.debug,t=console.log,n=console.info,r=console.warn,o=console.error;console.__ori__={debug:e,log:t,info:n,warn:r,error:o},console.debug=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("debug")&&console.__ori__.debug.apply(console,e)},console.log=function(){for(var e=[],t=arguments.length;t--;)e[t]=argumen
 ts[t];Dt("log")&&console.__ori__.log.apply(console,e)},console.info=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("info")&&console.__ori__.info.apply(console,e)},console.warn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("warn")&&console.__ori__.warn.apply(console,e)},console.error=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("error")&&console.__ori__.error.apply(console,e)}}}function $t(){Lu={},global.console=Wu}function Rt(){Fu.forEach(function(e){var t=Fu.indexOf(e);Lu[e]={},Fu.forEach(function(n){Fu.indexOf(n)<=t&&(Lu[e][n]=!0)})})}function Dt(e){var t=global.WXEnvironment&&global.WXEnvironment.logLevel||"log";return Lu[t]&&Lu[t][e]}function Ft(e){return e.map(function(e){return e="[object object]"===Object.prototype.toString.call(e).toLowerCase()?JSON.stringify(e):String(e)})}function Lt(){if(void 0===setTimeout&&"function"==typeof Vu){var e={},t=0;global.setTimeout=function(n,r){e[++t]=n,Vu(t.toString(),r)},
 global.setTimeoutCallback=function(t){"function"==typeof e[t]&&(e[t](),delete e[t])}}}function Wt(){global.setTimeout=Uu,global.setTimeoutCallback=null}function Ut(){Object.freeze(Object),Object.freeze(Array),Vt(),Object.freeze(Array.prototype),Object.freeze(String.prototype),Object.freeze(Number.prototype),Object.freeze(Boolean.prototype),Bt(),Object.freeze(Date.prototype),Object.freeze(RegExp.prototype)}function Vt(){var e=Object.prototype,t="Object.prototype";qt(e,"__defineGetter__",t),qt(e,"__defineSetter__",t),qt(e,"__lookupGetter__",t),qt(e,"__lookupSetter__",t),qt(e,"constructor",t),qt(e,"hasOwnProperty",t),qt(e,"isPrototypeOf",t),qt(e,"propertyIsEnumerable",t),qt(e,"toLocaleString",t),qt(e,"toString",t),qt(e,"valueOf",t),Object.seal(e)}function Bt(){var e=Error.prototype,t="Error.prototype";qt(e,"name",t),qt(e,"message",t),qt(e,"toString",t),qt(e,"constructor",t),Object.seal(e)}function qt(e,t,n){if(e.hasOwnProperty(t)){var r=e[t];Object.defineProperty(e,t,{get:function(){re
 turn r},set:function(r){if(this===e)throw Error("Cannot assign to read only property "+t+" of "+n);return Object.defineProperty(this,t,{value:r,writable:!0}),r}})}}function zt(){return(Bu++).toString()}function Jt(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)}function Ht(e){if("function"!=typeof btoa)return"";var t=Array.prototype.map.call(new Uint8Array(e),function(e){return String.fromCharCode(e)}).join("");return btoa(t)}function Gt(e){if("function"!=typeof atob)return new ArrayBuffer(0);var t=atob(e),n=new Uint8Array(t.length);return Array.prototype.forEach.call(t,function(e,t){n[t]=e.charCodeAt(0)}),n.buffer}function Xt(e){var t=Jt(e);switch(t){case"Undefined":case"Null":return"";case"RegExp":return e.toString();case"Date":return e.toISOString();case"Number":case"String":case"Boolean":case"Array":case"Object":return e;case"ArrayBuffer":return{"@type":"binary",dataType:t,base64:Ht(e)};case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int
 16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":
-case"Float64Array":return{"@type":"binary",dataType:t,base64:Ht(e.buffer)};default:return JSON.stringify(e)}}function Kt(e){if("Object"===Jt(e)){if(e["@type"]&&"binary"===e["@type"])return Gt(e.base64||"");var t={};for(var n in e)t[n]=Kt(e[n]);return t}return"Array"===Jt(e)?e.map(Kt):e}function Zt(e,t){e&&(zu[e]=t)}function Qt(e){return zu[e]}function Yt(e){delete zu[e]}function en(e){var t=zu[e];return t&&t.taskCenter?t.taskCenter:null}function tn(e,t,n){var r=e.documentElement;if(!(r.pureChildren.length>0||t.parentNode)){var o=r.children,i=o.indexOf(n);i<0?o.push(t):o.splice(i,0,t),1===t.nodeType?("body"===t.role?(t.docId=e.id,t.ownerDocument=e,t.parentNode=r,on(t,r)):(t.children.forEach(function(e){e.parentNode=t}),rn(e,t),t.docId=e.id,t.ownerDocument=e,on(t,r),delete e.nodeMap[t.nodeId]),r.pureChildren.push(t),nn(e,t)):(t.parentNode=r,e.nodeMap[t.ref]=t)}}function nn(e,t){var n=t.toJSON(),r=n.children;delete n.children;var o=e.taskCenter.send("dom",{action:"createBody"},[n]);ret
 urn r&&r.forEach(function(t){o=e.taskCenter.send("dom",{action:"addElement"},[n.ref,t,-1])}),o}function rn(e,t){t.role="body",t.depth=1,delete e.nodeMap[t.nodeId],t.ref="_root",e.nodeMap._root=t,e.body=t}function on(e,t){e.parentNode=t,t.docId&&(e.docId=t.docId,e.ownerDocument=t.ownerDocument,e.ownerDocument.nodeMap[e.nodeId]=e,e.depth=t.depth+1),e.children.forEach(function(t){on(t,e)})}function an(e){for(;e;){if(1===e.nodeType)return e;e=e.nextSibling}}function sn(e){for(;e;){if(1===e.nodeType)return e;e=e.previousSibling}}function un(e,t,n,r){n<0&&(n=0);var o=t[n-1],i=t[n];return t.splice(n,0,e),r&&(o&&(o.nextSibling=e),e.previousSibling=o,e.nextSibling=i,i&&(i.previousSibling=e)),n}function cn(e,t,n,r){var o=t.indexOf(e);if(o<0)return-1;if(r){var i=t[o-1],a=t[o+1];i&&(i.nextSibling=a),a&&(a.previousSibling=i)}t.splice(o,1);var s=n;o<=n&&(s=n-1);var u=t[s-1],c=t[s];return t.splice(s,0,e),r&&(u&&(u.nextSibling=e),e.previousSibling=u,e.nextSibling=c,c&&(c.previousSibling=e)),o===s?-
 1:n}function ln(e,t,n){var r=t.indexOf(e);if(!(r<0)){if(n){var o=t[r-1],i=t[r+1];o&&(o.nextSibling=i),i&&(i.previousSibling=o)}t.splice(r,1)}}function fn(e,t){if(t&&t.length){var n=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Hu);t.forEach(function(t){n.prototype[t]=function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o=en(this.docId);if(o)return o.send("component",{ref:this.ref,component:e,method:t},n)}}),Gu[e]=n}}function pn(e){return Gu[e]}function dn(e,t){Qt(e).nodeMap[t.nodeId]=t}function hn(){var e={createFinish:global.callCreateFinish,updateFinish:global.callUpdateFinish,refreshFinish:global.callRefreshFinish,createBody:global.callCreateBody,addElement:global.callAddElement,removeElement:global.callRemoveElement,moveElement:global.callMoveElement,updateAttrs:global.callUpdateAttrs,updateStyle:global.callUpdateStyle,addEvent:global.callAddEvent,removeEvent:glob
 al.callRemoveEvent},t=Yu.prototype;for(var n in e)!function(n){var r=e[n];t[n]=r?function(e,t){return r.apply(void 0,[e].concat(t))}:function(e,t){return Qu(e,[{module:"dom",method:n,args:t}],"-1")}}(n);t.componentHandler=global.callNativeComponent||function(e,t,n,r,o){return Qu(e,[{component:o.component,ref:t,method:n,args:r}])},t.moduleHandler=global.callNativeModule||function(e,t,n,r){return Qu(e,[{module:t,method:n,args:r}])}}function vn(e,t){mn(e)?console.warn('Service "'+e+'" has been registered already!'):(t=Object.assign({},t),nc.push({name:e,options:t}))}function yn(e){nc.some(function(t,n){if(t.name===e)return nc.splice(n,1),!0})}function mn(e){return _n(e)>=0}function _n(e){return nc.map(function(e){return e.name}).indexOf(e)}function gn(e){var t=rc.exec(e);if(t)try{return JSON.parse(t[1]).framework}catch(e){}return"Weex"}function bn(e,t,n){var r=Object.create(null);return r.service=Object.create(null),nc.forEach(function(o){var i=(o.name,o.options),a=i.create;if(a){var s
 =a(e,t,n);Object.assign(r.service,s),Object.assign(r,s.instance)}}),delete r.service.instance,Object.freeze(r.service),r}function wn(e){if(oc[e])return oc[e].framework}function xn(e,t,n,r){if(oc[e])return new Error('invalid instance id "'+e+'"');var o=gn(t);n=JSON.parse(JSON.stringify(n||{})),n.env=JSON.parse(JSON.stringify(global.WXEnvironment||{}));var i={config:n,created:Date.now(),framework:o};i.services=bn(e,i,tc),oc[e]=i;var a=ec[o];return a?a.createInstance(e,t,n,r,i):new Error('invalid bundle type "'+o+'".')}function En(e){ic[e]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];"registerComponents"===e&&On(t[0]);for(var r in ec){var o=ec[r];o&&o[e]&&o[e].apply(o,t)}}}function On(e){Array.isArray(e)&&e.forEach(function(e){e&&e.type&&e.methods&&fn(e.type,e.methods)})}function Cn(e){ic[e]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=t[0],o=wn(r);if(o&&ec[o]){var i=(s=ec[o])[e].apply(s,t),a={framework:o};return"refreshInstance"===e?nc.f
 orEach(function(e){var t=e.options.refresh;t&&t(r,{info:a,runtime:tc})}):"destroyInstance"===e&&(nc.forEach(function(e){var t=e.options.destroy;t&&t(r,{info:a,runtime:tc})}),delete oc[r]),i}return new Error('invalid instance id "'+r+'"');var s}}function Sn(e,t){ic[t]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=t[0],o=wn(r);return o&&ec[o]?(i=ec[o])[e].apply(i,t):new Error('invalid instance id "'+r+'"');var i}}function kn(e){tc=e||{},ec=tc.frameworks||{},hn();for(var t in ec){ec[t].init(e)}return["registerComponents","registerModules","registerMethods"].forEach(En),["destroyInstance","refreshInstance","receiveTasks","getRoot"].forEach(Cn),Sn("receiveTasks","callJS"),ic}function jn(e,t){return void 0===t&&(t=[]),{module:"dom",method:e,args:t}}function An(e,t){var n=t||global.callNative;return"function"!=typeof n&&console.error("[JS Runtime] no default handler"),function(t){Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var o=Tn(e,t[r],n);if(-1===o)re
 turn o}}}function In(e,t){return"dom"===e&&uc[t]&&"function"==typeof global[uc[t]]}function Tn(e,t,n){var r=t.module,o=t.method,i=t.args;return In(r,o)?global[uc[o]].apply(global,[e].concat(i,["-1"])):n(e,[t],"-1")}function Nn(e,t){var n=t.attrs||{};for(var r in n)e.setAttr(r,n[r],!0);var o=t.style||{};for(var i in o)e.setStyle(i,o[i],!0)}function Pn(){Ut(),Object.freeze(lc.Comment),Object.freeze(lc.Listener),Object.freeze(lc.Document.prototype),Object.freeze(lc.Comment.prototype),Object.freeze(lc.Listener.prototype)}function Mn(e,t){void 0===t&&(t={}),this.type=e||"message",this.data=t.data||null,this.origin=t.origin||"",this.source=t.source||null,this.ports=t.ports||[],this.target=null,this.timeStamp=Date.now()}function $n(){}function Rn(e,t,n,r){console.warn("[Upgrade Warning] $userTrack will be removed in the next version!"),console.warn("[JS Framework] Vm#$userTrack is deprecated, please use \"require('@weex-module/userTrack').commit(type, name, comName, param)\" instead"),this
 ._app.requireModule("userTrack").commit(e,t,n,r)}function Dn(e,t){if(console.warn("[Upgrade Warning] $sendMtop will be removed in the next version!"),console.warn("[JS Framework] Vm#$sendMtop is deprecated, please use \"require('@weex-module/stream').sendMtop(params, callback)\" instead"),"undefined"==typeof window){this._app.requireModule("windvane").call({class:"MtopWVPlugin",method:"send",data:e},t)}else{this._app.requireModule("stream").sendMtop(e,t)}}function Fn(e,t){console.warn("[Upgrade Warning] $callWindvane will be removed in the next version!"),console.warn("[JS Framework] Vm#$callWindvane is deprecated, please use \"require('@weex-module/windvane').call(params, callback)\" instead"),this._app.requireModule("windvane").call(e,t)}function Ln(e,t){console.warn("[Upgrade Warning] $setSpm will be removed in the next version!"),console.warn("[JS Framework] Vm#$setSpm is deprecated, please use \"require('@weex-module/pageInfo').setSpm(a, b)\" instead"),this._app.requireModule("
 pageInfo").setSpm(e,t)}function Wn(e){console.warn("[Upgrade Warning] $getUserInfo will be removed in the next version!"),console.warn("[JS Framework] Vm#$getUserInfo is deprecated, please use \"require('@weex-module/user').getUserInfo(callback)\" instead"),this._app.requireModule("user").getUserInfo(e)}function Un(e){console.warn("[Upgrade Warning] $login will be removed in the next version!"),console.warn("[JS Framework] Vm#$login is deprecated, please use \"require('@weex-module/user').login(callback)\" instead"),this._app.requireModule("user").login(e)}function Vn(e){console.warn("[Upgrade Warning] $logout will be removed in the next version!"),console.warn("[JS Framework] Vm#$logout is deprecated, please use \"require('@weex-module/user').logout(callback)\" instead"),this._app.requireModule("user").logout(e)}var Bn,qn={},zn={},Jn=Object.freeze({init:e,createInstance:t,destroyInstance:n,getRoot:r,receiveTasks:o}),Hn="undefined"!=typeof window?window:void 0!==global?global:"undef
 ined"!=typeof self?self:{},Gn=a(function(e){e.exports=function(e,t){function n(e){return void 0===e||null===e}function r(e){return void 0!==e&&null!==e}function o(e){return!0===e}function i(e){return!1===e}function a(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Object]"===kn.call(e)}function c(e){return"[object RegExp]"===kn.call(e)}function l(e){var t=parseFloat(e);return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function p(e){var t=parseFloat(e);return isNaN(t)?e:t}function d(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function h(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function v(e,t){return An.call(e,t)}function y(e){var t=Object.create(null);return function(n){retu
 rn t[n]||(t[n]=e(n))}}function m(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function _(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function g(e,t){for(var n in t)e[n]=t[n];return e}function b(e){for(var t={},n=0;n<e.length;n++)e[n]&&g(t,e[n]);return t}function w(e,t,n){}function x(e,t){if(e===t)return!0;var n=s(e),r=s(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),i=Array.isArray(t);if(o&&i)return e.length===t.length&&e.every(function(e,n){return x(e,t[n])});if(o||i)return!1;var a=Object.keys(e),u=Object.keys(t);return a.length===u.length&&a.every(function(n){return x(e[n],t[n])})}catch(e){return!1}}function E(e,t){for(var n=0;n<e.length;n++)if(x(e[n],t))return n;return-1}function O(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function C(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function S(e,t,n,r){Object.definePr
 operty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function k(e){if(!Vn.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function j(e,t,n){if(Wn.errorHandler)Wn.errorHandler.call(null,e,t,n);else{if(!zn||"undefined"==typeof console)throw e;console.error(e)}}function A(e){return"function"==typeof e&&/native code/.test(e.toString())}function I(e){ar.target&&sr.push(ar.target),ar.target=e}function T(){ar.target=sr.pop()}function N(e,t,n){e.__proto__=t}function P(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];S(e,i,t[i])}}function M(e,t){if(s(e)){var n;return v(e,"__ob__")&&e.__ob__ instanceof pr?n=e.__ob__:fr.shouldConvert&&!tr()&&(Array.isArray(e)||u(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new pr(e)),t&&n&&n.vmCount++,n}}function $(e,t,n,r,o){var i=new ar,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,u=a&&a.set,c=!o&&M(n);Object.defineProperty(e,t,{enumerable:!0,configur
 able:!0,get:function(){var t=s?s.call(e):n;return ar.target&&(i.depend(),c&&c.dep.depend(),Array.isArray(t)&&F(t)),t},set:function(t){var r=s?s.call(e):n;t===r||t!==t&&r!==r||(u?u.call(e,t):n=t,c=!o&&M(t),i.notify())}})}}function R(e,t,n){if(Array.isArray(e)&&l(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(v(e,t))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?($(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function D(e,t){if(Array.isArray(e)&&l(t))return void e.splice(t,1);var n=e.__ob__;e._isVue||n&&n.vmCount||v(e,t)&&(delete e[t],n&&n.dep.notify())}function F(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&F(t)}function L(e,t){if(!t)return e;for(var n,r,o,i=Object.keys(t),a=0;a<i.length;a++)n=i[a],r=e[n],o=t[n],v(e,n)?u(r)&&u(o)&&L(r,o):R(e,n,o);return e}function W(e,t,n){return n?e||t?function(){var r="function"==typeof t?t.call(n):t,o="function"==typeof e?e.call(n):e;return r?L(r,o):o}:void 0:t?
 e?function(){return L("function"==typeof t?t.call(this):t,"function"==typeof e?e.call(this):e)}:t:e}function U(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function V(e,t){var n=Object.create(e||null);return t?g(n,t):n}function B(e){var t=e.props;if(t){var n,r,o,i={};if(Array.isArray(t))for(n=t.length;n--;)"string"==typeof(r=t[n])&&(o=Tn(r),i[o]={type:null});else if(u(t))for(var a in t)r=t[a],o=Tn(a),i[o]=u(r)?r:{type:r};e.props=i}}function q(e){var t=e.inject;if(Array.isArray(t))for(var n=e.inject={},r=0;r<t.length;r++)n[t[r]]=t[r]}function z(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function J(e,t,n){function r(r){var o=dr[r]||hr;u[r]=o(e[r],t[r],n,r)}"function"==typeof t&&(t=t.options),B(t),q(t),z(t);var o=t.extends;if(o&&(e=J(e,o,n)),t.mixins)for(var i=0,a=t.mixins.length;i<a;i++)e=J(e,t.mixins[i],n);var s,u={};for(s in e)r(s);for(s in t)v(e,s)||r(s);return u}function H(e,t,n,r){if("string"==typeof n){var o=e[t]
 ;if(v(o,n))return o[n];var i=Tn(n);if(v(o,i))return o[i];var a=Nn(i);if(v(o,a))return o[a];var s=o[n]||o[i]||o[a];return s}}function G(e,t,n,r){var o=t[e],i=!v(n,e),a=n[e];if(Z(Boolean,o.type)&&(i&&!v(o,"default")?a=!1:Z(String,o.type)||""!==a&&a!==Mn(e)||(a=!0)),void 0===a){a=X(r,o,e);var s=fr.shouldConvert;fr.shouldConvert=!0,M(a),fr.shouldConvert=s}return a}function X(e,t,n){if(v(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==K(t.type)?r.call(e):r}}function K(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Z(e,t){if(!Array.isArray(t))return K(t)===K(e);for(var n=0,r=t.length;n<r;n++)if(K(t[n])===K(e))return!0;return!1}function Q(e){return new vr(void 0,void 0,void 0,String(e))}function Y(e,t){var n=new vr(e.tag,e.data,e.children,e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return n.ns=e.ns,n.isStatic=e.isStatic,n.key=e.ke
 y,n.isComment=e.isComment,n.isCloned=!0,t&&e.children&&(n.children=ee(e.children)),n}function ee(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++)r[o]=Y(e[o],t);return r}function te(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),o=0;o<r.length;o++)r[o].apply(null,e)}return t.fns=e,t}function ne(e,t,r,o,i){var a,s,c,l,f;for(a in e)s=c=e[a],l=t[a],f=gr(a),u(s)&&(c=s.handler,f.params=s.params),n(c)||(n(l)?(n(c.fns)&&(c=e[a]=te(c)),r(f.name,c,f.once,f.capture,f.passive,f.params)):c!==l&&(l.fns=c,e[a]=l));for(a in t)n(e[a])&&(f=gr(a),o(f.name,t[a],f.capture))}function re(e,t,i){function a(){i.apply(this,arguments),h(s.fns,a)}var s,u=e[t];n(u)?s=te([a]):r(u.fns)&&o(u.merged)?(s=u,s.fns.push(a)):s=te([u,a]),s.merged=!0,e[t]=s}function oe(e,t,o){var i=t.options.props;if(!n(i)){var a={},s=e.attrs,u=e.props;if(r(s)||r(u))for(var c in i){var l=Mn(c);ie(a,u,c,l,!0)||ie(a,s,c,l,!1)}return a}}function ie(e,t,n,o,i){if(r(t)){if(v(t
 ,n))return e[n]=t[n],i||delete t[n],!0;if(v(t,o))return e[n]=t[o],i||delete t[o],!0}return!1}function ae(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function se(e){return a(e)?[Q(e)]:Array.isArray(e)?ce(e):void 0}function ue(e){return r(e)&&r(e.text)&&i(e.isComment)}function ce(e,t){var i,s,u,c=[];for(i=0;i<e.length;i++)s=e[i],n(s)||"boolean"==typeof s||(u=c[c.length-1],Array.isArray(s)?c.push.apply(c,ce(s,(t||"")+"_"+i)):a(s)?ue(u)?u.text+=String(s):""!==s&&c.push(Q(s)):ue(s)&&ue(u)?c[c.length-1]=Q(u.text+s.text):(o(e._isVList)&&r(s.tag)&&n(s.key)&&r(t)&&(s.key="__vlist"+t+"_"+i+"__"),c.push(s)));return c}function le(e,t){return e.__esModule&&e.default&&(e=e.default),s(e)?t.extend(e):e}function fe(e,t,n,r,o){var i=_r();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}function pe(e,t,i){if(o(e.error)&&r(e.errorComp))return e.errorComp;if(r(e.resolved))return e.resolved;if(o(e.loading)&&r(e.loadingCo
 mp))return e.loadingComp;if(!r(e.contexts)){var a=e.contexts=[i],u=!0,c=function(){for(var e=0,t=a.length;e<t;e++)a[e].$forceUpdate()},l=O(function(n){e.resolved=le(n,t),u||c()}),f=O(function(t){r(e.errorComp)&&(e.error=!0,c())}),p=e(l,f);return s(p)&&("function"==typeof p.then?n(e.resolved)&&p.then(l,f):r(p.component)&&"function"==typeof p.component.then&&(p.component.then(l,f),r(p.error)&&(e.errorComp=le(p.error,t)),r(p.loading)&&(e.loadingComp=le(p.loading,t),0===p.delay?e.loading=!0:setTimeout(function(){n(e.resolved)&&n(e.error)&&(e.loading=!0,c())},p.delay||200)),r(p.timeout)&&setTimeout(function(){n(e.resolved)&&f(null)},p.timeout))),u=!1,e.loading?e.loadingComp:e.resolved}e.contexts.push(i)}function de(e){return e.isComment&&e.asyncFactory}function he(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(r(n)&&(r(n.componentOptions)||de(n)))return n}}function ve(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&_e(e,t)}functi
 on ye(e,t,n){n?mr.$once(e,t):mr.$on(e,t)}function me(e,t){mr.$off(e,t)}function _e(e,t,n){mr=e,ne(t,n||{},ye,me,e)}function ge(e,t){var n={};if(!e)return n;for(var r=[],o=0,i=e.length;o<i;o++){var a=e[o];if(a.context!==t&&a.functionalContext!==t||!a.data||null==a.data.slot)r.push(a);else{var s=a.data.slot,u=n[s]||(n[s]=[]);"template"===a.tag?u.push.apply(u,a.children):u.push(a)}}return r.every(be)||(n.default=r),n}function be(e){return e.isComment||" "===e.text}function we(e,t){t=t||{};for(var n=0;n<e.length;n++)Array.isArray(e[n])?we(e[n],t):t[e[n].key]=e[n].fn;return t}function xe(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function Ee(e,t,n){e.$el=t,e.$options.render||(e.$options.render=_r),je(e,"beforeMount");var r;return r=function(){e._u
 pdate(e._render(),n)},e._watcher=new jr(e,r,w),n=!1,null==e.$vnode&&(e._isMounted=!0,je(e,"mounted")),e}function Oe(e,t,n,r,o){var i=!!(o||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==Un);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=o,e.$attrs=r.data&&r.data.attrs||Un,e.$listeners=n||Un,t&&e.$options.props){fr.shouldConvert=!1;for(var a=e._props,s=e.$options._propKeys||[],u=0;u<s.length;u++){var c=s[u];a[c]=G(c,e.$options.props,t,e)}fr.shouldConvert=!0,e.$options.propsData=t}if(n){var l=e.$options._parentListeners;e.$options._parentListeners=n,_e(e,n,l)}i&&(e.$slots=ge(o,r.context),e.$forceUpdate())}function Ce(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function Se(e,t){if(t){if(e._directInactive=!1,Ce(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Se(e.$children[n]);je(e,"activated")}}function ke(e,t){if(!(t&&(e.
 _directInactive=!0,Ce(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)ke(e.$children[n]);je(e,"deactivated")}}function je(e,t){var n=e.$options[t];if(n)for(var r=0,o=n.length;r<o;r++)try{n[r].call(e)}catch(n){j(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t)}function Ae(){Sr=wr.length=xr.length=0,Er={},Or=Cr=!1}function Ie(){Cr=!0;var e,t;for(wr.sort(function(e,t){return e.id-t.id}),Sr=0;Sr<wr.length;Sr++)e=wr[Sr],t=e.id,Er[t]=null,e.run();var n=xr.slice(),r=wr.slice();Ae(),Pe(n),Te(r),nr&&Wn.devtools&&nr.emit("flush")}function Te(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&je(r,"updated")}}function Ne(e){e._inactive=!1,xr.push(e)}function Pe(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Se(e[t],!0)}function Me(e){var t=e.id;if(null==Er[t]){if(Er[t]=!0,Cr){for(var n=wr.length-1;n>Sr&&wr[n].id>e.id;)n--;wr.splice(n+1,0,e)}else wr.push(e);Or||(Or=!0,or(Ie))}}function $e(e){Ar.clear(),Re(e,Ar)}function Re(e,t){var n,r,o=Array.
 isArray(e);if((o||s(e))&&Object.isExtensible(e)){if(e.__ob__){var i=e.__ob__.dep.id;if(t.has(i))return;t.add(i)}if(o)for(n=e.length;n--;)Re(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)Re(e[r[n]],t)}}function De(e,t,n){Ir.get=function(){return this[t][n]},Ir.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Ir)}function Fe(e){e._watchers=[];var t=e.$options;t.props&&Le(e,t.props),t.methods&&ze(e,t.methods),t.data?We(e):M(e._data={},!0),t.computed&&Ve(e,t.computed),t.watch&&t.watch!==Kn&&Je(e,t.watch)}function Le(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[],i=!e.$parent;fr.shouldConvert=i;for(var a in t)!function(i){o.push(i);var a=G(i,t,n,e);$(r,i,a),i in e||De(e,"_props",i)}(a);fr.shouldConvert=!0}function We(e){var t=e.$options.data;t=e._data="function"==typeof t?Ue(t,e):t||{},u(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,o=(e.$options.methods,n.length);o--;){var i=n[o];r&&v(r,i)||C(i)||De(e,"_data",i)}M(t,!0)}function Ue(e,t){t
 ry{return e.call(t)}catch(e){return j(e,t,"data()"),{}}}function Ve(e,t){var n=e._computedWatchers=Object.create(null),r=tr();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;r||(n[o]=new jr(e,a||w,w,Tr)),o in e||Be(e,o,i)}}function Be(e,t,n){var r=!tr();"function"==typeof n?(Ir.get=r?qe(t):n,Ir.set=w):(Ir.get=n.get?r&&!1!==n.cache?qe(t):n.get:w,Ir.set=n.set?n.set:w),Object.defineProperty(e,t,Ir)}function qe(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),ar.target&&t.depend(),t.value}}function ze(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?w:m(t[n],e)}function Je(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)He(e,n,r[o]);else He(e,n,r)}}function He(e,t,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Ge(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}function Xe(e){var t=Ke(e.$options.inject,e);t&&(f
 r.shouldConvert=!1,Object.keys(t).forEach(function(n){$(e,n,t[n])}),fr.shouldConvert=!0)}function Ke(e,t){if(e){for(var n=Object.create(null),r=rr?Reflect.ownKeys(e):Object.keys(e),o=0;o<r.length;o++)for(var i=r[o],a=e[i],s=t;s;){if(s._provided&&a in s._provided){n[i]=s._provided[a];break}s=s.$parent}return n}}function Ze(e,t,n,o,i){var a={},s=e.options.props;if(r(s))for(var u in s)a[u]=G(u,s,t||Un);else r(n.attrs)&&Qe(a,n.attrs),r(n.props)&&Qe(a,n.props);var c=Object.create(o),l=function(e,t,n,r){return ot(c,e,t,n,r,!0)},f=e.options.render.call(null,l,{data:n,props:a,children:i,parent:o,listeners:n.on||Un,injections:Ke(e.options.inject,o),slots:function(){return ge(i,o)}});return f instanceof vr&&(f.functionalContext=o,f.functionalOptions=e.options,n.slot&&((f.data||(f.data={})).slot=n.slot)),f}function Qe(e,t){for(var n in t)e[Tn(n)]=t[n]}function Ye(e,t,i,a,u){if(!n(e)){var c=i.$options._base;if(s(e)&&(e=c.extend(e)),"function"==typeof e){var l;if(n(e.cid)&&(l=e,void 0===(e=pe(l,
 c,i))))return fe(l,t,i,a,u);t=t||{},gt(e),r(t.model)&&rt(e.options,t);var f=oe(t,e,u);if(o(e.options.functional))return Ze(e,f,t,i,a);var p=t.on;if(t.on=t.nativeOn,o(e.options.abstract)){var d=t.slot;t={},d&&(t.slot=d)}tt(t);var h=e.options.name||u;return new vr("vue-component-"+e.cid+(h?"-"+h:""),t,void 0,void 0,void 0,i,{Ctor:e,propsData:f,listeners:p,tag:u,children:a},l)}}}function et(e,t,n,o){var i=e.componentOptions,a={_isComponent:!0,parent:t,propsData:i.propsData,_componentTag:i.tag,_parentVnode:e,_parentListeners:i.listeners,_renderChildren:i.children,_parentElm:n||null,_refElm:o||null},s=e.data.inlineTemplate;return r(s)&&(a.render=s.render,a.staticRenderFns=s.staticRenderFns),new i.Ctor(a)}function tt(e){e.hook||(e.hook={});for(var t=0;t<Pr.length;t++){var n=Pr[t],r=e.hook[n],o=Nr[n];e.hook[n]=r?nt(o,r):o}}function nt(e,t){return function(n,r,o,i){e(n,r,o,i),t(n,r,o,i)}}function rt(e,t){var n=e.model&&e.model.prop||"value",o=e.model&&e.model.event||"input";(t.props||(t.pro
 ps={}))[n]=t.model.value;var i=t.on||(t.on={});r(i[o])?i[o]=[t.model.callback].concat(i[o]):i[o]=t.model.callback}function ot(e,t,n,r,i,s){return(Array.isArray(n)||a(n))&&(i=r,r=n,n=void 0),o(s)&&(i=$r),it(e,t,n,r,i)}function it(e,t,n,o,i){if(r(n)&&r(n.__ob__))return _r();if(r(n)&&r(n.is)&&(t=n.is),!t)return _r();Array.isArray(o)&&"function"==typeof o[0]&&(n=n||{},n.scopedSlots={default:o[0]},o.length=0),i===$r?o=se(o):i===Mr&&(o=ae(o));var a,s;if("string"==typeof t){var u;s=e.$vnode&&e.$vnode.ns||Wn.getTagNamespace(t),a=Wn.isReservedTag(t)?new vr(Wn.parsePlatformTagName(t),n,o,void 0,void 0,e):r(u=H(e.$options,"components",t))?Ye(u,n,e,o,t):new vr(t,n,o,void 0,void 0,e)}else a=Ye(t,n,e,o);return r(a)?(s&&at(a,s),a):_r()}function at(e,t){if(e.ns=t,"foreignObject"!==e.tag&&r(e.children))for(var o=0,i=e.children.length;o<i;o++){var a=e.children[o];r(a.tag)&&n(a.ns)&&at(a,t)}}function st(e,t){var n,o,i,a,u;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),o=0,i=e.length
 ;o<i;o++)n[o]=t(e[o],o);else if("number"==typeof e)for(n=new Array(e),o=0;o<e;o++)n[o]=t(o+1,o);else if(s(e))for(a=Object.keys(e),n=new Array(a.length),o=0,i=a.length;o<i;o++)u=a[o],n[o]=t(e[u],u,o);return r(n)&&(n._isVList=!0),n}function ut(e,t,n,r){var o=this.$scopedSlots[e];if(o)return n=n||{},r&&(n=g(g({},r),n)),o(n)||t;var i=this.$slots[e];return i||t}function ct(e){return H(this.$options,"filters",e,!0)||Rn}function lt(e,t,n){var r=Wn.keyCodes[t]||n;return Array.isArray(r)?-1===r.indexOf(e):r!==e}function ft(e,t,n,r,o){if(n)if(s(n)){Array.isArray(n)&&(n=b(n));var i;for(var a in n)!function(a){if("class"===a||"style"===a||jn(a))i=e;else{var s=e.attrs&&e.attrs.type;i=r||Wn.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}if(!(a in i)&&(i[a]=n[a],o)){(e.on||(e.on={}))["update:"+a]=function(e){n[a]=e}}}(a)}else;return e}function pt(e,t){var n=this._staticTrees[e];return n&&!t?Array.isArray(n)?ee(n):Y(n):(n=this._staticTrees[e]=this.$options.staticRenderFns[e].c
 all(this._renderProxy),ht(n,"__static__"+e,!1),n)}function dt(e,t,n){return ht(e,"__once__"+t+(n?"_"+n:""),!0),e}function ht(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&vt(e[r],t+"_"+r,n);else vt(e,t,n)}function vt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function yt(e,t){if(t)if(u(t)){var n=e.on=e.on?g({},e.on):{};for(var r in t){var o=n[r],i=t[r];n[r]=o?[].concat(i,o):i}}else;return e}function mt(e){e._vnode=null,e._staticTrees=null;var t=e.$vnode=e.$options._parentVnode,n=t&&t.context;e.$slots=ge(e.$options._renderChildren,n),e.$scopedSlots=Un,e._c=function(t,n,r,o){return ot(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return ot(e,t,n,r,o,!0)};var r=t&&t.data;$(e,"$attrs",r&&r.attrs||Un,null,!0),$(e,"$listeners",e.$options._parentListeners||Un,null,!0)}function _t(e,t){var n=e.$options=Object.create(e.constructor.options);n.parent=t.parent,n.propsData=t.propsData,n._parentVnode=t._parentVnode,n._parentListeners=t._parentListeners,n._ren
 derChildren=t._renderChildren,n._componentTag=t._componentTag,n._parentElm=t._parentElm,n._refElm=t._refElm,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function gt(e){var t=e.options;if(e.super){var n=gt(e.super);if(n!==e.superOptions){e.superOptions=n;var r=bt(e);r&&g(e.extendOptions,r),t=e.options=J(n,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function bt(e){var t,n=e.options,r=e.extendOptions,o=e.sealedOptions;for(var i in n)n[i]!==o[i]&&(t||(t={}),t[i]=wt(n[i],r[i],o[i]));return t}function wt(e,t,n){if(Array.isArray(e)){var r=[];n=Array.isArray(n)?n:[n],t=Array.isArray(t)?t:[t];for(var o=0;o<e.length;o++)(t.indexOf(e[o])>=0||n.indexOf(e[o])<0)&&r.push(e[o]);return r}return e}function xt(e){this._init(e)}function Et(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.a
 pply(null,n),t.push(e),this}}function Ot(e){e.mixin=function(e){return this.options=J(this.options,e),this}}function Ct(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=J(n.options,e),a.super=n,a.options.props&&St(a),a.options.computed&&kt(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Fn.forEach(function(e){a[e]=n[e]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=g({},a.options),o[r]=a,a}}function St(e){var t=e.options.props;for(var n in t)De(e.prototype,"_props",n)}function kt(e){var t=e.options.computed;for(var n in t)Be(e.prototype,n,t[n])}function jt(e){Fn.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:
 n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function At(e){return e&&(e.Ctor.options.name||e.tag)}function It(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!c(e)&&e.test(t)}function Tt(e,t,n){for(var r in e){var o=e[r];if(o){var i=At(o.componentOptions);i&&!n(i)&&(o!==t&&Nt(o),e[r]=null)}}}function Nt(e){e&&e.componentInstance.$destroy()}function Pt(e){return new t.Element(e)}function Mt(e,n){return new t.Element(e+":"+n)}function $t(e){return new t.TextNode(e)}function Rt(e){return new t.Comment(e)}function Dt(e,t,n){if(3!==t.nodeType)e.insertBefore(t,n);else if("text"===e.type)e.setAttr("value",t.text),t.parentNode=e;else{var r=Pt("text");r.setAttr("value",t.text),e.insertBefore(r,n)}}function Ft(e,t){if(3===t.nodeType)return void e.setAttr("value","");e.removeChild(t)}function Lt(e,t){if(3!==t.nodeType)e.appendChild(t);else if("text"===e.type)e.setAttr("value",t.text),t.parentNode=e;else{var n=Pt("text");n.setAt
 tr("value",t.text),e.appendChild(n)}}function Wt(e){return e.parentNode}function Ut(e){return e.nextSibling}function Vt(e){return e.type}function Bt(e,t){e.parentNode.setAttr("value",t)}function qt(e,t,n){e.setAttr(t,n)}function zt(e,t){var n=e.data.ref;if(n){var r=e.context,o=e.componentInstance||e.elm,i=r.$refs;t?Array.isArray(i[n])?h(i[n],o):i[n]===o&&(i[n]=void 0):e.data.refInFor?Array.isArray(i[n])?i[n].indexOf(o)<0&&i[n].push(o):i[n]=[o]:i[n]=o}}function Jt(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&r(e.data)===r(t.data)&&Ht(e,t)||o(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&n(t.asyncFactory.error))}function Ht(e,t){if("input"!==e.tag)return!0;var n,o=r(n=e.data)&&r(n=n.attrs)&&n.type,i=r(n=t.data)&&r(n=n.attrs)&&n.type;return o===i||qr(o)&&qr(i)}function Gt(e,t,n){var o,i,a={};for(o=t;o<=n;++o)i=e[o].key,r(i)&&(a[i]=o);return a}function Xt(e,t){(e.data.directives||t.data.directives)&&Kt(e,t)}function Kt(e,t){var n,r,o,i=e===zr,a=t===zr,
 s=Zt(e.data.directives,e.context),u=Zt(t.data.directives,t.context),c=[],l=[];for(n in u)r=s[n],
-o=u[n],r?(o.oldValue=r.value,Yt(o,"update",t,e),o.def&&o.def.componentUpdated&&l.push(o)):(Yt(o,"bind",t,e),o.def&&o.def.inserted&&c.push(o));if(c.length){var f=function(){for(var n=0;n<c.length;n++)Yt(c[n],"inserted",t,e)};i?re(t.data.hook||(t.data.hook={}),"insert",f):f()}if(l.length&&re(t.data.hook||(t.data.hook={}),"postpatch",function(){for(var n=0;n<l.length;n++)Yt(l[n],"componentUpdated",t,e)}),!i)for(n in s)u[n]||Yt(s[n],"unbind",e,e,a)}function Zt(e,t){var n=Object.create(null);if(!e)return n;var r,o;for(r=0;r<e.length;r++)o=e[r],o.modifiers||(o.modifiers=Gr),n[Qt(o)]=o,o.def=H(t.$options,"directives",o.name,!0);return n}function Qt(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function Yt(e,t,n,r,o){var i=e.def&&e.def[t];if(i)try{i(n.elm,e,n,r,o)}catch(r){j(r,n.context,"directive "+e.name+" "+t+" hook")}}function en(e,t){if(e.data.attrs||t.data.attrs){var n,r,o=t.elm,i=e.data.attrs||{},a=t.data.attrs||{};a.__ob__&&(a=t.data.attrs=g({},a));for(n in 
 a)r=a[n],i[n]!==r&&o.setAttr(n,r);for(n in i)null==a[n]&&o.setAttr(n)}}function tn(e,t){var n=t.elm,r=t.context,o=t.data,i=e.data;if(o.staticClass||o.class||i&&(i.staticClass||i.class)){var a=[],s=i.staticClass;s&&a.push.apply(a,s),i.class&&a.push.apply(a,i.class);var u=[],c=o.staticClass;c&&u.push.apply(u,c),o.class&&u.push.apply(u,o.class);var l=nn(a,u,r);for(var f in l)n.setStyle(f,l[f])}}function nn(e,t,n){var r=n.$options.style||{},o={};return t.forEach(function(e){g(o,r[e])}),e.forEach(function(e){var t=r[e];for(var n in t)o.hasOwnProperty(n)||(o[n]="")}),o}function rn(e,t,n,r,o,i){if(r)return void console.log("Weex do not support event in bubble phase.");if(n){var a=t,s=Wr;t=function(t){null!==(1===arguments.length?a(t):a.apply(null,arguments))&&on(e,null,null,s)}}Wr.addEvent(e,t,i)}function on(e,t,n,r){(r||Wr).removeEvent(e)}function an(e,t){if(e.data.on||t.data.on){var n=t.data.on||{},r=e.data.on||{};Wr=t.elm,ne(n,r,rn,on,t.context)}}function sn(e,t){if(!t.data.staticStyle)
 return void un(e,t);var n=t.elm,r=t.data.staticStyle;for(var o in r)r[o]&&n.setStyle(Yr(o),r[o]);un(e,t)}function un(e,t){if(e.data.style||t.data.style){var n,r,o=t.elm,i=e.data.style||{},a=t.data.style||{},s=a.__ob__;Array.isArray(a)&&(a=t.data.style=cn(a)),s&&(a=t.data.style=g({},a));for(r in i)a[r]||o.setStyle(Yr(r),"");for(r in a)n=a[r],o.setStyle(Yr(r),n)}}function cn(e){for(var t={},n=0;n<e.length;n++)e[n]&&g(t,e[n]);return t}function ln(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&g(t,to(e.name||"v")),g(t,e),t}return"string"==typeof e?to(e):void 0}}function fn(e,t){var n=t.elm;n._leaveCb&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=ln(t.data.transition);if(r&&!n._enterCb){for(var o=r.enterClass,i=r.enterToClass,a=r.enterActiveClass,s=r.appearClass,u=r.appearToClass,c=r.appearActiveClass,l=r.beforeEnter,f=r.enter,p=r.afterEnter,d=r.enterCancelled,h=r.beforeAppear,v=r.appear,y=r.afterAppear,m=r.appearCancelled,_=br,g=br.$vnode;g&&g.parent;)g=g.parent,_=g.context;
 var b=!_._isMounted||!t.isRootInsert;if(!b||v||""===v){var x=b?s:o,E=b?u:i,C=b?c:a,S=b?h||l:l,k=b&&"function"==typeof v?v:f,j=b?y||p:p,A=b?m||d:d,I=k&&(k._length||k.length)>1,T=t.context.$options.style||{},N=T[x],P=T["@TRANSITION"]&&T["@TRANSITION"][C]||{},M=dn(n,T,x,E,C,t.context),$=Object.keys(M).length>0,R=n._enterCb=O(function(){R.cancelled?A&&A(n):j&&j(n),n._enterCb=null});if(setTimeout(function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];if(r&&r.context===t.context&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),k&&k(n,R),$){t.context.$requireWeexModule("animation").transition(n.ref,{styles:M,duration:P.duration||0,delay:P.delay||0,timingFunction:P.timingFunction||"linear"},I?w:R)}else I||R()},16),S&&S(n),N)for(var D in N)n.setStyle(D,N[D]);$||I||R()}}}function pn(e,t){function n(){function t(){n.transition(r.ref,{styles:y,duration:m.duration||0,delay:m.delay||0,timingFunction:m.timingFunction||"linear"},d?w:_)}var n=e.context.$requireWeexModule("animation");_.can
 celled||(e.data.show||((r.parentNode._pending||(r.parentNode._pending={}))[e.key]=e),u&&u(r),v?n.transition(r.ref,{styles:v},t):t(),c&&c(r,_),y||d||_())}var r=e.elm;r._enterCb&&(r._enterCb.cancelled=!0,r._enterCb());var o=ln(e.data.transition);if(!o)return t();if(!r._leaveCb){var i=o.leaveClass,a=o.leaveToClass,s=o.leaveActiveClass,u=o.beforeLeave,c=o.leave,l=o.afterLeave,f=o.leaveCancelled,p=o.delayLeave,d=c&&(c._length||c.length)>1,h=e.context.$options.style||{},v=h[i],y=h[a]||h[s],m=h["@TRANSITION"]&&h["@TRANSITION"][s]||{},_=r._leaveCb=O(function(){r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[e.key]=null),_.cancelled?f&&f(r):(t(),l&&l(r)),r._leaveCb=null});p?p(n):n()}}function dn(e,t,n,r,o,i){var a={},s=t[n],u=t[r],c=t[o];if(s)for(var l in s)a[l]=e.style[l];if(c)for(var f in c)0!==f.indexOf("transition")&&(a[f]=c[f]);return u&&g(a,u),a}function hn(e){return e.tag?e.tag.replace(/vue\-component\-(\d+\-)?/,""):""}function vn(e){return e.children&&1===e.children.lengt
 h&&!e.children[0].tag}function yn(e){var t=String(e).match(so);return t?Number(t[1]):e}function mn(e){if(e&&e.data){var t=e.data,n=t.staticStyle,r=t.staticClass;if(e.data.style||e.data.class||n||r){var o=Object.assign({},n,e.data.style),i=e.context.$options.style||{};[].concat(r,e.data.class).forEach(function(e){e&&i[e]&&Object.assign(o,i[e])});for(var a in o)o[a]=yn(o[a]);return o}}}function _n(e){if(e.length)return e.map(function(e){var t=hn(e),n={type:t};if(t){if(n.style=mn(e),e.data&&(n.attr=e.data.attrs,e.data.on&&(n.events=e.data.on)),"span"===t&&vn(e))return n.attr=n.attr||{},n.attr.value=e.children[0].text.trim(),n}else n.type="span",n.attr={value:(e.text||"").trim()};return e.children&&e.children.length&&(n.children=_n(e.children)),n})}function gn(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?gn(he(t.children)):e}function bn(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var i in o)t[Tn(i)]=o[i];return t}function 
 wn(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function xn(e){for(;e=e.parent;)if(e.data.transition)return!0}function En(e,t){return t.key===e.key&&t.tag===e.tag}function On(){}function Cn(){}function Sn(e,n){var r=new t.Comment("root");return r.hasAttribute=r.removeAttribute=function(){},n.documentElement.appendChild(r),r}var kn=Object.prototype.toString,jn=(d("slot,component",!0),d("key,ref,slot,is")),An=Object.prototype.hasOwnProperty,In=/-(\w)/g,Tn=y(function(e){return e.replace(In,function(e,t){return t?t.toUpperCase():""})}),Nn=y(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),Pn=/\B([A-Z])/g,Mn=y(function(e){return e.replace(Pn,"-$1").toLowerCase()}),$n=function(e,t,n){return!1},Rn=function(e){return e},Dn="data-server-rendered",Fn=["component","directive","filter"],Ln=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated"],Wn={optionMergeSt
 rategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:$n,isReservedAttr:$n,isUnknownElement:$n,getTagNamespace:w,parsePlatformTagName:Rn,mustUseProp:$n,_lifecycleHooks:Ln},Un=Object.freeze({}),Vn=/[^\w.$]/,Bn=w,qn="__proto__"in{},zn="undefined"!=typeof window,Jn=zn&&window.navigator.userAgent.toLowerCase(),Gn=(Jn&&/msie|trident/.test(Jn),Jn&&Jn.indexOf("msie 9.0"),Jn&&Jn.indexOf("edge/")>0),Xn=(Jn&&Jn.indexOf("android"),Jn&&/iphone|ipad|ipod|ios/.test(Jn)),Kn=(Jn&&/chrome\/\d+/.test(Jn),{}.watch),Zn=!1;if(zn)try{var Qn={};Object.defineProperty(Qn,"passive",{get:function(){Zn=!0}}),window.addEventListener("test-passive",null,Qn)}catch(e){}var Yn,er,tr=function(){return void 0===Yn&&(Yn=!zn&&void 0!==Hn&&"server"===Hn.process.env.VUE_ENV),Yn},nr=zn&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,rr="undefined"!=typeof Symbol&&A(Symbol)&&"undefined"!=typeof Reflect&&A(Refl
 ect.ownKeys),or=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t<e.length;t++)e[t]()}var t,n=[],r=!1;if("undefined"!=typeof Promise&&A(Promise)){var o=Promise.resolve(),i=function(e){console.error(e)};t=function(){o.then(e).catch(i),Xn&&setTimeout(w)}}else if("undefined"==typeof MutationObserver||!A(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())t=function(){setTimeout(e,0)};else{var a=1,s=new MutationObserver(e),u=document.createTextNode(String(a));s.observe(u,{characterData:!0}),t=function(){a=(a+1)%2,u.data=String(a)}}return function(e,o){var i;if(n.push(function(){if(e)try{e.call(o)}catch(e){j(e,o,"nextTick")}else i&&i(o)}),r||(r=!0,t()),!e&&"undefined"!=typeof Promise)return new Promise(function(e,t){i=e})}}();er="undefined"!=typeof Set&&A(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.cl
 ear=function(){this.set=Object.create(null)},e}();var ir=0,ar=function(){this.id=ir++,this.subs=[]};ar.prototype.addSub=function(e){this.subs.push(e)},ar.prototype.removeSub=function(e){h(this.subs,e)},ar.prototype.depend=function(){ar.target&&ar.target.addDep(this)},ar.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},ar.target=null;var sr=[],ur=Array.prototype,cr=Object.create(ur);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=ur[e];S(cr,e,function(){for(var n=arguments,r=[],o=arguments.length;o--;)r[o]=n[o];var i,a=t.apply(this,r),s=this.__ob__;switch(e){case"push":case"unshift":i=r;break;case"splice":i=r.slice(2)}return i&&s.observeArray(i),s.dep.notify(),a})});var lr=Object.getOwnPropertyNames(cr),fr={shouldConvert:!0},pr=function(e){if(this.value=e,this.dep=new ar,this.vmCount=0,S(e,"__ob__",this),Array.isArray(e)){(qn?N:P)(e,cr,lr),this.observeArray(e)}else this.walk(e)};pr.prototype.walk=functi
 on(e){for(var t=Object.keys(e),n=0;n<t.length;n++)$(e,t[n],e[t[n]])},pr.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)M(e[t])};var dr=Wn.optionMergeStrategies;dr.data=function(e,t,n){return n?W(e,t,n):t&&"function"!=typeof t?e:W.call(this,e,t)},Ln.forEach(function(e){dr[e]=U}),Fn.forEach(function(e){dr[e+"s"]=V}),dr.watch=function(e,t){if(e===Kn&&(e=void 0),t===Kn&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var n={};g(n,e);for(var r in t){var o=n[r],i=t[r];o&&!Array.isArray(o)&&(o=[o]),n[r]=o?o.concat(i):Array.isArray(i)?i:[i]}return n},dr.props=dr.methods=dr.inject=dr.computed=function(e,t){if(!e)return t;var n=Object.create(null);return g(n,e),t&&g(n,t),n},dr.provide=W;var hr=function(e,t){return void 0===t?e:t},vr=function(e,t,n,r,o,i,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.functionalContext=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=vo
 id 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},yr={child:{}};yr.child.get=function(){return this.componentInstance},Object.defineProperties(vr.prototype,yr);var mr,_r=function(e){void 0===e&&(e="");var t=new vr;return t.text=e,t.isComment=!0,t},gr=y(function(e){var t="&"===e.charAt(0);e=t?e.slice(1):e;var n="~"===e.charAt(0);e=n?e.slice(1):e;var r="!"===e.charAt(0);return e=r?e.slice(1):e,{name:e,once:n,capture:r,passive:t}}),br=null,wr=[],xr=[],Er={},Or=!1,Cr=!1,Sr=0,kr=0,jr=function(e,t,n,r){this.vm=e,e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++kr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new er,this.newDepIds=new er,this.expression="","function"==typeof t?this.getter=t:(this.getter=k(t),this.getter||
 (this.getter=function(){})),this.value=this.lazy?void 0:this.get()};jr.prototype.get=function(){I(this);var e,t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;j(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&$e(e),T(),this.cleanupDeps()}return e},jr.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},jr.prototype.cleanupDeps=function(){for(var e=this,t=this.deps.length;t--;){var n=e.deps[t];e.newDepIds.has(n.id)||n.removeSub(e)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},jr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Me(this)},jr.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||s(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){j(e,this.v
 m,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},jr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},jr.prototype.depend=function(){for(var e=this,t=this.deps.length;t--;)e.deps[t].depend()},jr.prototype.teardown=function(){var e=this;if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var t=this.deps.length;t--;)e.deps[t].removeSub(e);this.active=!1}};var Ar=new er,Ir={enumerable:!0,configurable:!0,get:w,set:w},Tr={lazy:!0},Nr={init:function(e,t,n,r){if(!e.componentInstance||e.componentInstance._isDestroyed){(e.componentInstance=et(e,br,n,r)).$mount(t?e.elm:void 0,t)}else if(e.data.keepAlive){var o=e;Nr.prepatch(o,o)}},prepatch:function(e,t){var n=t.componentOptions;Oe(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,je(n,"mounted")),e.data.keepAlive&&(t._isMounted?Ne(n):Se(n,!0))},destroy:funct
 ion(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?ke(t,!0):t.$destroy())}},Pr=Object.keys(Nr),Mr=1,$r=2,Rr=0;!function(e){e.prototype._init=function(e){var t=this;t._uid=Rr++,t._isVue=!0,e&&e._isComponent?_t(t,e):t.$options=J(gt(t.constructor),e||{},t),t._renderProxy=t,t._self=t,xe(t),ve(t),mt(t),je(t,"beforeCreate"),Xe(t),Fe(t),Ge(t),je(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(xt),function(e){var t={};t.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=R,e.prototype.$delete=D,e.prototype.$watch=function(e,t,n){var r=this;if(u(t))return He(r,e,t,n);n=n||{},n.user=!0;var o=new jr(r,e,t,n);return n.immediate&&t.call(r,o.value),function(){o.teardown()}}}(xt),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this,o=this;if(Array.isArray(e))for(var i=0,a=e.length;i<a;i++)r.$on(e[i],n);else(o._events[e]||(o._ev
 ents[e]=[])).push(n),t.test(e)&&(o._hasHookEvent=!0);return o},e.prototype.$once=function(e,t){function n(){r.$off(e,n),t.apply(r,arguments)}var r=this;return n.fn=t,r.$on(e,n),r},e.prototype.$off=function(e,t){var n=this,r=this;if(!arguments.length)return r._events=Object.create(null),r;if(Array.isArray(e)){for(var o=0,i=e.length;o<i;o++)n.$off(e[o],t);return r}var a=r._events[e];if(!a)return r;if(1===arguments.length)return r._events[e]=null,r;for(var s,u=a.length;u--;)if((s=a[u])===t||s.fn===t){a.splice(u,1);break}return r},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?_(n):n;for(var r=_(arguments,1),o=0,i=n.length;o<i;o++)try{n[o].apply(t,r)}catch(n){j(n,t,'event handler for "'+e+'"')}}return t}}(xt),function(e){e.prototype._update=function(e,t){var n=this;n._isMounted&&je(n,"beforeUpdate");var r=n.$el,o=n._vnode,i=br;br=n,n._vnode=e,o?n.$el=n.__patch__(o,e):(n.$el=n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentE
 lm=n.$options._refElm=null),br=i,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){je(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||h(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),je(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null)}}}(xt),function(e){e.prototype.$nextTick=function(e){return or(e,this)},e.prototype._render=function(){var e=this,t=e.$options,n=t.render,r=t.staticRenderFns,o=t._parentVnode;if(e._isMounted)for(var i in e.$slots){var a=e.$slots[i];a._rendered&&(e.$slots[i]=ee(a,!0))}e.$scopedSlots=o&&o.data.scopedSlots||Un,r&&!e._staticTrees&&(e._static
 Trees=[]),e.$vnode=o;var s;try{s=n.call(e._renderProxy,e.$createElement)}catch(t){j(t,e,"render function"),s=e._vnode}return s instanceof vr||(s=_r()),s.parent=o,s},e.prototype._o=dt,e.prototype._n=p,e.prototype._s=f,e.prototype._l=st,e.prototype._t=ut,e.prototype._q=x,e.prototype._i=E,e.prototype._m=pt,e.prototype._f=ct,e.prototype._k=lt,e.prototype._b=ft,e.prototype._v=Q,e.prototype._e=_r,e.prototype._u=we,e.prototype._g=yt}(xt);var Dr=[String,RegExp,Array],Fr={name:"keep-alive",abstract:!0,props:{include:Dr,exclude:Dr},created:function(){this.cache=Object.create(null)},destroyed:function(){var e=this;for(var t in e.cache)Nt(e.cache[t])},watch:{include:function(e){Tt(this.cache,this._vnode,function(t){return It(e,t)})},exclude:function(e){Tt(this.cache,this._vnode,function(t){return!It(e,t)})}},render:function(){var e=he(this.$slots.default),t=e&&e.componentOptions;if(t){var n=At(t);if(n&&(this.include&&!It(this.include,n)||this.exclude&&It(this.exclude,n)))return e;var r=null==e.
 key?t.Ctor.cid+(t.tag?"::"+t.tag:""):e.key;this.cache[r]?e.componentInstance=this.cache[r].componentInstance:this.cache[r]=e,e.data.keepAlive=!0}return e}},Lr={KeepAlive:Fr};!function(e){var t={};t.get=function(){return Wn},Object.defineProperty(e,"config",t),e.util={warn:Bn,extend:g,mergeOptions:J,defineReactive:$},e.set=R,e.delete=D,e.nextTick=or,e.options=Object.create(null),Fn.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,g(e.options.components,Lr),Et(e),Ot(e),Ct(e),jt(e)}(xt),Object.defineProperty(xt.prototype,"$isServer",{get:tr}),Object.defineProperty(xt.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),xt.version="2.4.2";var Wr,Ur={},Vr=Object.freeze({namespaceMap:Ur,createElement:Pt,createElementNS:Mt,createTextNode:$t,createComment:Rt,insertBefore:Dt,removeChild:Ft,appendChild:Lt,parentNode:Wt,nextSibling:Ut,tagName:Vt,setTextContent:Bt,setAttribute:qt}),Br={create:function(e,t){zt(t)},update:function(e,t){
 e.data.ref!==t.data.ref&&(zt(e,!0),zt(t))},destroy:function(e){zt(e,!0)}},qr=(d("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),d("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),d("text,number,password,search,email,tel,url")),zr=new vr("",{},[]),Jr=[
 "create","activate","update","remove","destroy"],Hr={create:Xt,update:Xt,destroy:function(e){Xt(e,zr)}},Gr=Object.create(null),Xr=[Br,Hr],Kr={create:en,update:en},Zr={create:tn,update:tn},Qr={create:an,update:an},Yr=y(Tn),eo={create:sn,update:un},to=y(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),no=(zn&&window.requestAnimationFrame&&window.requestAnimationFrame.bind(window),{create:fn,activate:fn,remove:pn}),ro=[Kr,Zr,Qr,eo,no],oo=ro.concat(Xr),io=function(e){function t(e){return new vr(T.tagName(e).toLowerCase(),{},[],void 0,e)}function i(e,t){function n(){0==--n.listeners&&s(e)}return n.listeners=t,n}function s(e){var t=T.parentNode(e);r(t)&&T.removeChild(t,e)}function u(e,t,n,i,a){if(e.isRootInsert=!a,!c(e,t,n,i)){var s=e.data,u=e.children,l=e.tag;if(r(l)){e.elm=e.ns?T.createElementNS(e.ns,l):T.createElement(l,e),m(e);var f=r(s)&&o(s.app
 endAsTree);f||(r(s)&&y(e,t),p(n,e.elm,i)),h(e,u,t),f&&(r(s)&&y(e,t),p(n,e.elm,i))}else o(e.isComment)?(e.elm=T.createComment(e.text),p(n,e.elm,i)):(e.elm=T.createTextNode(e.text),p(n,e.elm,i))}}function c(e,t,n,i){var a=e.data;if(r(a)){var s=r(e.componentInstance)&&a.keepAlive;if(r(a=a.hook)&&r(a=a.init)&&a(e,!1,n,i),r(e.componentInstance))return l(e,t),o(s)&&f(e,t,n,i),!0}}function l(e,t){r(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,v(e)?(y(e,t),m(e)):(zt(e),t.push(e))}function f(e,t,n,o){for(var i,a=e;a.componentInstance;)if(a=a.componentInstance._vnode,r(i=a.data)&&r(i=i.transition)){for(i=0;i<A.activate.length;++i)A.activate[i](zr,a);t.push(a);break}p(n,e.elm,o)}function p(e,t,n){r(e)&&(r(n)?n.parentNode===e&&T.insertBefore(e,t,n):T.appendChild(e,t))}function h(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)u(t[r],n,e.elm,null,!0);else a(e.text)&&T.appendChild(e.elm,T.createTextNode(e.text))}functi
 on v(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return r(e.tag)}function y(e,t){for(var n=0;n<A.create.length;++n)A.create[n](zr,e);k=e.data.hook,r(k)&&(r(k.create)&&k.create(zr,e),r(k.insert)&&t.push(e))}function m(e){for(var t,n=e;n;)r(t=n.context)&&r(t=t.$options._scopeId)&&T.setAttribute(e.elm,t,""),n=n.parent;r(t=br)&&t!==e.context&&r(t=t.$options._scopeId)&&T.setAttribute(e.elm,t,"")}function _(e,t,n,r,o,i){for(;r<=o;++r)u(n[r],i,e,t)}function g(e){var t,n,o=e.data;if(r(o))for(r(t=o.hook)&&r(t=t.destroy)&&t(e),t=0;t<A.destroy.length;++t)A.destroy[t](e);if(r(t=e.children))for(n=0;n<e.children.length;++n)g(e.children[n])}function b(e,t,n,o){for(;n<=o;++n){var i=t[n];r(i)&&(r(i.tag)?(w(i),g(i)):s(i.elm))}}function w(e,t){if(r(t)||r(e.data)){var n,o=A.remove.length+1;for(r(t)?t.listeners+=o:t=i(e.elm,o),r(n=e.componentInstance)&&r(n=n._vnode)&&r(n.data)&&w(n,t),n=0;n<A.remove.length;++n)A.remove[n](e,t);r(n=e.data.hook)&&r(n=n.remove)?n(e,t):t()}else s(e.elm)}functi
 on x(e,t,o,i,a){for(var s,c,l,f,p=0,d=0,h=t.length-1,v=t[0],y=t[h],m=o.length-1,g=o[0],w=o[m],x=!a;p<=h&&d<=m;)n(v)?v=t[++p]:n(y)?y=t[--h]:Jt(v,g)?(O(v,g,i),v=t[++p],g=o[++d]):Jt(y,w)?(O(y,w,i),y=t[--h],w=o[--m]):Jt(v,w)?(O(v,w,i),x&&T.insertBefore(e,v.elm,T.nextSibling(y.elm)),v=t[++p],w=o[--m]):Jt(y,g)?(O(y,g,i),x&&T.insertBefore(e,y.elm,v.elm),y=t[--h],g=o[++d]):(n(s)&&(s=Gt(t,p,h)),c=r(g.key)?s[g.key]:E(g,t,p,h),n(c)?u(g,i,e,v.elm):(l=t[c],Jt(l,g)?(O(l,g,i),t[c]=void 0,x&&T.insertBefore(e,l.elm,v.elm)):u(g,i,e,v.elm)),g=o[++d]);p>h?(f=n(o[m+1])?null:o[m+1].elm,_(e,f,o,d,m,i)):d>m&&b(e,t,p,h)}function E(e,t,n,o){for(var i=n;i<o;i++){var a=t[i];if(r(a)&&Jt(e,a))return i}}function O(e,t,i,a){if(e!==t){var s=t.elm=e.elm;if(o(e.isAsyncPlaceholder))return void(r(t.asyncFactory.resolved)?S(e.elm,t,i):t.isAsyncPlaceholder=!0);if(o(t.isStatic)&&o(e.isStatic)&&t.key===e.key&&(o(t.isCloned)||o(t.isOnce)))return void(t.componentInstance=e.componentInstance);var u,c=t.data;r(c)&&r(u=c.hook)&
 &r(u=u.prepatch)&&u(e,t);var l=e.children,f=t.children;if(r(c)&&v(t)){for(u=0;u<A.update.length;++u)A.update[u](e,t);r(u=c.hook)&&r(u=u.update)&&u(e,t)}n(t.text)?r(l)&&r(f)?l!==f&&x(s,l,f,i,a):r(f)?(r(e.text)&&T.setTextContent(s,""),_(s,null,f,0,f.length-1,i)):r(l)?b(s,l,0,l.length-1):r(e.text)&&T.setTextContent(s,""):e.text!==t.text&&T.setTextContent(s,t.text),r(c)&&r(u=c.hook)&&r(u=u.postpatch)&&u(e,t)}}function C(e,t,n){if(o(n)&&r(e.parent))e.parent.data.pendingInsert=t;else for(var i=0;i<t.length;++i)t[i].data.hook.insert(t[i])}function S(e,t,n){if(o(t.isComment)&&r(t.asyncFactory))return t.elm=e,t.isAsyncPlaceholder=!0,!0;t.elm=e;var i=t.tag,a=t.data,s=t.children;if(r(a)&&(r(k=a.hook)&&r(k=k.init)&&k(t,!0),r(k=t.componentInstance)))return l(t,n),!0;if(r(i)){if(r(s))if(e.hasChildNodes()){for(var u=!0,c=e.firstChild,f=0;f<s.length;f++){if(!c||!S(c,s[f],n)){u=!1;break}c=c.nextSibling}if(!u||c)return!1}else h(t,s,n);if(r(a))for(var p in a)if(!N(p)){y(t,n);break}}else e.data!==t.tex
 t&&(e.data=t.text);return!0}var k,j,A={},I=e.modules,T=e.nodeOps;for(k=0;k<Jr.length;++k)for(A[Jr[k]]=[],j=0;j<I.length;++j)r(I[j][Jr[k]])&&A[Jr[k]].push(I[j][Jr[k]]);var N=d("attrs,style,class,staticC

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/test/screenshot/border-android.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-android.png b/test/screenshot/border-android.png
new file mode 100644
index 0000000..166a287
Binary files /dev/null and b/test/screenshot/border-android.png differ



[17/18] incubator-weex git commit: * [android] add border-android.png

Posted by gu...@apache.org.
* [android] add border-android.png


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

Branch: refs/heads/release-0.16
Commit: 64e14b1a8064ed2cc02340e0b58efacf7c5817bc
Parents: f549f70 659284d
Author: misakuo <mi...@apache.org>
Authored: Mon Oct 23 14:51:28 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Mon Oct 23 14:51:28 2017 +0800

----------------------------------------------------------------------
 .github/PULL_REQUEST_TEMPLATE.md                |    4 +-
 .travis.yml                                     |    4 -
 CONTRIBUTING.md                                 |   22 +-
 .../java/com/alibaba/weex/IndexActivity.java    |   12 -
 android/sdk/build.gradle                        |    1 +
 android/sdk/libs/armeabi/libweexjsb.so          |  Bin 22620 -> 22620 bytes
 android/sdk/libs/armeabi/libweexjsc.so          |  Bin 338160 -> 335324 bytes
 android/sdk/libs/armeabi/libweexjss.so          |  Bin 6754016 -> 6754016 bytes
 android/sdk/libs/armeabi/libweexjst.so          |  Bin 0 -> 22552 bytes
 android/sdk/libs/x86/libweexjsc.so              |  Bin 12121924 -> 12126020 bytes
 .../main/java/com/taobao/weex/WXSDKEngine.java  |   13 +
 .../java/com/taobao/weex/bridge/WXBridge.java   |   17 +
 .../com/taobao/weex/bridge/WXBridgeManager.java | 1019 +++++++++---------
 .../java/com/taobao/weex/common/Constants.java  |    3 +
 .../java/com/taobao/weex/common/IWXBridge.java  |    9 +
 .../java/com/taobao/weex/dom/WXDomObject.java   |    4 +-
 .../dom/action/AbstractAddElementAction.java    |    4 +-
 .../weex/dom/action/MoveElementAction.java      |    3 +
 .../ui/component/AbstractEditComponent.java     |    8 +
 .../taobao/weex/ui/component/WXComponent.java   |    4 +-
 .../weex/ui/component/WXComponentFactory.java   |    2 -
 .../com/taobao/weex/ui/component/WXImage.java   |   10 +
 .../taobao/weex/ui/component/WXScroller.java    |    2 +-
 .../com/taobao/weex/ui/component/WXSlider.java  |    2 +-
 .../weex/ui/component/WXSliderNeighbor.java     |    2 +-
 .../taobao/weex/ui/component/WXVContainer.java  |    6 +-
 .../ui/component/list/BasicListComponent.java   |  116 +-
 .../ui/component/list/StickyHeaderHelper.java   |   43 +-
 .../taobao/weex/ui/component/list/WXCell.java   |   68 +-
 .../list/template/WXRecyclerTemplateList.java   |    4 +-
 .../weex/ui/view/listview/WXRecyclerView.java   |   24 +-
 .../java/com/taobao/weex/utils/WXLogUtils.java  |   30 +-
 .../taobao/weex/utils/WXSoInstallMgrSdk.java    |   69 ++
 .../java/com/taobao/weex/utils/WXViewUtils.java |   25 +-
 .../com/taobao/weex/utils/WXLogUtilsTest.java   |   16 +-
 .../java/com/taobao/weex/utils/WXUtilsTest.java |    3 +-
 .../taobao/weex/bridge/WXWebsocketBridge.java   |   15 +
 dangerfile.js                                   |   47 +-
 doc/source/cn/guide/contributing.md             |   27 +-
 doc/source/guide/contributing.md                |   26 +-
 doc/source/references/platform-difference.md    |   11 +
 doc/source/references/platfrom-difference.md    |   11 -
 .../references/vue/difference-with-web.md       |    2 +-
 doc/themes/weex/layout/_partial/article.ejs     |    2 +
 doc/themes/weex/layout/index.ejs                |    3 +
 doc/themes/weex/layout/layout.ejs               |    2 -
 doc/themes/weex/source/css/common.scss          |    4 +-
 doc/themes/weex/source/css/partial/header.scss  |    2 +-
 doc/themes/weex/source/css/post.scss            |    7 +-
 doc/themes/weex/source/css/variable.scss        |    2 +-
 html5/runtime/api/WeexInstance.js               |  126 +++
 html5/runtime/api/component.js                  |   51 +
 html5/runtime/api/init.js                       |  107 +-
 html5/runtime/api/module.js                     |   56 +
 html5/runtime/vdom/Element.js                   |    2 +-
 ios/sdk/WeexSDK.xcodeproj/project.pbxproj       |   12 +
 .../WeexSDK/Sources/Bridge/WXBridgeContext.m    |   13 +-
 ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m |   16 +-
 .../Sources/Component/WXCycleSliderComponent.m  |    2 +-
 .../Sources/Component/WXScrollerComponent.m     |   31 +-
 .../WeexSDK/Sources/Component/WXWebComponent.m  |    3 +
 .../Sources/Display/WXComponent+BoxShadow.m     |    9 +-
 ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m    |    5 +-
 ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h     |    6 +
 .../WeexSDK/Sources/Monitor/WXExceptionUtils.h  |   29 +
 .../WeexSDK/Sources/Monitor/WXExceptionUtils.m  |   57 +
 ios/sdk/WeexSDK/Sources/WeexSDK.h               |    1 +
 pre-build/native-bundle-main.js                 |   16 +-
 test/screenshot/border-ios.png                  |  Bin 128088 -> 129071 bytes
 69 files changed, 1494 insertions(+), 758 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/64e14b1a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/64e14b1a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
----------------------------------------------------------------------


[18/18] incubator-weex git commit: * [android] memory optimization for box-shadow

Posted by gu...@apache.org.
* [android] memory optimization for box-shadow


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

Branch: refs/heads/release-0.16
Commit: d69658666efcaf21f5c928a59eda6ed105d57e0b
Parents: 185d3b1 64e14b1
Author: gurisxie <27...@qq.com>
Authored: Mon Oct 23 16:09:33 2017 +0800
Committer: gurisxie <27...@qq.com>
Committed: Mon Oct 23 16:10:04 2017 +0800

----------------------------------------------------------------------
 .../java/com/taobao/weex/common/Constants.java  |   1 +
 .../taobao/weex/ui/component/WXComponent.java   |  17 +++-
 .../com/taobao/weex/utils/BoxShadowUtil.java    |  88 ++++++++++++-------
 test/screenshot/border-android.png              | Bin 164260 -> 164417 bytes
 4 files changed, 75 insertions(+), 31 deletions(-)
----------------------------------------------------------------------



[15/18] incubator-weex git commit: Revert: Revert: Revert: * [android] modify border-android.png

Posted by gu...@apache.org.
Revert: Revert: Revert: * [android] modify border-android.png


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

Branch: refs/heads/release-0.16
Commit: 84f03905f57e4ba697bb36db3627ad920dc1092b
Parents: 1ba3c45
Author: misakuo <mi...@apache.org>
Authored: Mon Oct 23 14:45:31 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Mon Oct 23 14:45:31 2017 +0800

----------------------------------------------------------------------
 test/screenshot/border-ios.png | Bin 129071 -> 128088 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/84f03905/test/screenshot/border-ios.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-ios.png b/test/screenshot/border-ios.png
index 992ea7d..2bacdd3 100644
Binary files a/test/screenshot/border-ios.png and b/test/screenshot/border-ios.png differ


[14/18] incubator-weex git commit: Revert: Revert: * [android] modify border-android.png

Posted by gu...@apache.org.
Revert: Revert: * [android] modify border-android.png


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

Branch: refs/heads/release-0.16
Commit: 1ba3c4549bfd460988af0920a0687fc8f2b23aef
Parents: bdcc535
Author: misakuo <mi...@apache.org>
Authored: Mon Oct 23 14:43:07 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Mon Oct 23 14:43:07 2017 +0800

----------------------------------------------------------------------
 test/screenshot/border-ios.png | Bin 128088 -> 129071 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1ba3c454/test/screenshot/border-ios.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-ios.png b/test/screenshot/border-ios.png
index 2bacdd3..992ea7d 100644
Binary files a/test/screenshot/border-ios.png and b/test/screenshot/border-ios.png differ


[07/18] incubator-weex git commit: * [android] modify border-android.png

Posted by gu...@apache.org.
* [android] modify border-android.png


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

Branch: refs/heads/release-0.16
Commit: 28dd9f3b8ce55a014d4823332bd32e9572ccf4ad
Parents: 43b013c
Author: misakuo <mi...@apache.org>
Authored: Mon Oct 23 14:34:07 2017 +0800
Committer: misakuo <mi...@apache.org>
Committed: Mon Oct 23 14:34:07 2017 +0800

----------------------------------------------------------------------
 .github/PULL_REQUEST_TEMPLATE.md                |    4 +-
 .travis.yml                                     |    4 -
 CONTRIBUTING.md                                 |   22 +-
 .../java/com/alibaba/weex/IndexActivity.java    |   12 -
 android/sdk/build.gradle                        |    1 +
 android/sdk/libs/armeabi/libweexjsb.so          |  Bin 22620 -> 22620 bytes
 android/sdk/libs/armeabi/libweexjsc.so          |  Bin 338160 -> 335324 bytes
 android/sdk/libs/armeabi/libweexjss.so          |  Bin 6754016 -> 6754016 bytes
 android/sdk/libs/armeabi/libweexjst.so          |  Bin 0 -> 22552 bytes
 android/sdk/libs/x86/libweexjsc.so              |  Bin 12121924 -> 12126020 bytes
 .../main/java/com/taobao/weex/WXSDKEngine.java  |   13 +
 .../java/com/taobao/weex/bridge/WXBridge.java   |   17 +
 .../com/taobao/weex/bridge/WXBridgeManager.java | 1019 +++++++++---------
 .../java/com/taobao/weex/common/Constants.java  |    3 +
 .../java/com/taobao/weex/common/IWXBridge.java  |    9 +
 .../java/com/taobao/weex/dom/WXDomObject.java   |    4 +-
 .../dom/action/AbstractAddElementAction.java    |    4 +-
 .../weex/dom/action/MoveElementAction.java      |    3 +
 .../ui/component/AbstractEditComponent.java     |    8 +
 .../taobao/weex/ui/component/WXComponent.java   |    4 +-
 .../weex/ui/component/WXComponentFactory.java   |    2 -
 .../com/taobao/weex/ui/component/WXImage.java   |   10 +
 .../taobao/weex/ui/component/WXScroller.java    |    2 +-
 .../com/taobao/weex/ui/component/WXSlider.java  |    2 +-
 .../weex/ui/component/WXSliderNeighbor.java     |    2 +-
 .../taobao/weex/ui/component/WXVContainer.java  |    6 +-
 .../ui/component/list/BasicListComponent.java   |  116 +-
 .../ui/component/list/StickyHeaderHelper.java   |   43 +-
 .../taobao/weex/ui/component/list/WXCell.java   |   68 +-
 .../list/template/WXRecyclerTemplateList.java   |    4 +-
 .../weex/ui/view/listview/WXRecyclerView.java   |   24 +-
 .../java/com/taobao/weex/utils/WXLogUtils.java  |   30 +-
 .../taobao/weex/utils/WXSoInstallMgrSdk.java    |   69 ++
 .../java/com/taobao/weex/utils/WXViewUtils.java |   25 +-
 .../com/taobao/weex/utils/WXLogUtilsTest.java   |   16 +-
 .../java/com/taobao/weex/utils/WXUtilsTest.java |    3 +-
 .../taobao/weex/bridge/WXWebsocketBridge.java   |   15 +
 dangerfile.js                                   |   47 +-
 doc/source/cn/guide/contributing.md             |   27 +-
 doc/source/guide/contributing.md                |   26 +-
 doc/source/references/platform-difference.md    |   11 +
 doc/source/references/platfrom-difference.md    |   11 -
 .../references/vue/difference-with-web.md       |    2 +-
 doc/themes/weex/layout/_partial/article.ejs     |    2 +
 doc/themes/weex/layout/index.ejs                |    3 +
 doc/themes/weex/layout/layout.ejs               |    2 -
 doc/themes/weex/source/css/common.scss          |    4 +-
 doc/themes/weex/source/css/partial/header.scss  |    2 +-
 doc/themes/weex/source/css/post.scss            |    7 +-
 doc/themes/weex/source/css/variable.scss        |    2 +-
 html5/runtime/api/WeexInstance.js               |  126 +++
 html5/runtime/api/component.js                  |   51 +
 html5/runtime/api/init.js                       |  107 +-
 html5/runtime/api/module.js                     |   56 +
 html5/runtime/vdom/Element.js                   |    2 +-
 ios/sdk/WeexSDK.xcodeproj/project.pbxproj       |   12 +
 .../WeexSDK/Sources/Bridge/WXBridgeContext.m    |   13 +-
 ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m |   16 +-
 .../Sources/Component/WXCycleSliderComponent.m  |    2 +-
 .../Sources/Component/WXScrollerComponent.m     |   31 +-
 .../WeexSDK/Sources/Component/WXWebComponent.m  |    3 +
 .../Sources/Display/WXComponent+BoxShadow.m     |    9 +-
 ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m    |    5 +-
 ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h     |    6 +
 .../WeexSDK/Sources/Monitor/WXExceptionUtils.h  |   29 +
 .../WeexSDK/Sources/Monitor/WXExceptionUtils.m  |   57 +
 ios/sdk/WeexSDK/Sources/WeexSDK.h               |    1 +
 pre-build/native-bundle-main.js                 |   16 +-
 test/screenshot/border-android.png              |  Bin 0 -> 164417 bytes
 test/screenshot/border-ios.png                  |  Bin 128088 -> 129071 bytes
 70 files changed, 1494 insertions(+), 758 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/.github/PULL_REQUEST_TEMPLATE.md
----------------------------------------------------------------------
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 0a6fb20..fea8dd9 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -48,13 +48,13 @@ Thank you for your support.
 
 <!--
 (请在***提交***前删除这段描述)
-It's ***RECOMMENDED*** to submit typo fix, new demo and tiny bugfix to `master` branch. New feature and other modifications can be submitted to "domain" branch including `ios`, `android`, `jsfm`, `html5`.
+It's ***RECOMMENDED*** to submit typo fix, new demo, tiny bugfix and large feature to `master` branch.
     
 See [Branch Strategy](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-management) for more detail.
 
 ----
 
-错别字修改、新 demo、较小的 bugfix 都可以直接提到 `master` 分支;新需求以及任何你不确定影响面的改动,请提交到对应“领域”的分支(`ios`、`android`、`jsfm`、`html5`)。
+错别字修改、新 demo、较小的 bugfix、甚至较大的功能都可以直接提到 `master` 分支;
 
 查看完整的[分支策略 (英文)](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-management)。
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index a7bca6f..95624a6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,10 +20,6 @@ matrix:
       - os: linux
         env: TEST_SUITE=android
     include:
-      - os: osx
-        env: TEST_SUITE=ios
-        osx_image: xcode8.1
-        language: objective-c
       - os: linux
         env: TEST_SUITE=android
         jdk: oraclejdk8

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e30a65c..e18f8de 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -19,21 +19,21 @@ Besides Weex dev mailing list, we also have some other mailing lists for you. Yo
 ```
 release
  ↑
-master         <--- PR(hotfix/typo/3rd-PR)
- ↑ PR
-{domain}-feature-{point}
+{version}
+ ↑
+master         <--- PR(feature/hotfix/typo)
 ```
 
-0. `release` branch
-    0. `release ` is the latest release branch.
-0. `master ` branch
-    0. `master ` is the stable developing branch.
+0. `master` branch
+    0. `master` is the stable developing branch.
     0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `master `***.
-0. `{domain}-feature-{point}` branch
-    0. The branch for a developing iteration, e.g. `android-feature-list-update` is an android developing iteration which is for list update. `{domain}` consists of `android`, `ios`, `jsfm` and `html5`. 
-    0. **DO NOT commit any PR to such a branch**.
+0. `{version}` branch
+    0. `{version}` is used for every version which we consider for stable publish.
+    0. e.g. `v0.16`
+0. `release` branch
+    0. `release` is the latest release branch,we will make tag and publish version on this branch.
 
-### Branch Name 
+### Branch Name For PR
 
 ```
 {module}-{action}-{shortName}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java
----------------------------------------------------------------------
diff --git a/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java b/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java
index 866733a..0603363 100644
--- a/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java
+++ b/android/playground/app/src/main/java/com/alibaba/weex/IndexActivity.java
@@ -103,18 +103,6 @@ public class IndexActivity extends AbstractWeexActivity {
     };
 
     LocalBroadcastManager.getInstance(this).registerReceiver(mReloadReceiver, new IntentFilter(WXSDKEngine.JS_FRAMEWORK_RELOAD));
-
-    requestWeexPermission();
-  }
-
-  private void requestWeexPermission() {
-    if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
-      if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
-        Toast.makeText(this, "please give me the permission", Toast.LENGTH_SHORT).show();
-      } else {
-        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_PERMISSION_REQUEST_CODE);
-      }
-    }
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/build.gradle
----------------------------------------------------------------------
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index 0be69fb..a49a05f 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -127,6 +127,7 @@ android {
         targetCompatibility JavaVersion.VERSION_1_7
     }
     testOptions {
+        unitTests.returnDefaultValues = true
         unitTests.all {
             maxHeapSize = "1024m"
             jvmArgs += ['-XX:-UseSplitVerifier', '-noverify','-Xverify:none']/* fix VerifyError  */

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/libs/armeabi/libweexjsb.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjsb.so b/android/sdk/libs/armeabi/libweexjsb.so
index 4b13b06..cb739b4 100755
Binary files a/android/sdk/libs/armeabi/libweexjsb.so and b/android/sdk/libs/armeabi/libweexjsb.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/libs/armeabi/libweexjsc.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjsc.so b/android/sdk/libs/armeabi/libweexjsc.so
index 12f6df2..7a9d85b 100755
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and b/android/sdk/libs/armeabi/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/libs/armeabi/libweexjss.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjss.so b/android/sdk/libs/armeabi/libweexjss.so
index 0187882..3efefa5 100755
Binary files a/android/sdk/libs/armeabi/libweexjss.so and b/android/sdk/libs/armeabi/libweexjss.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/libs/armeabi/libweexjst.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/armeabi/libweexjst.so b/android/sdk/libs/armeabi/libweexjst.so
new file mode 100755
index 0000000..099256c
Binary files /dev/null and b/android/sdk/libs/armeabi/libweexjst.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/libs/x86/libweexjsc.so
----------------------------------------------------------------------
diff --git a/android/sdk/libs/x86/libweexjsc.so b/android/sdk/libs/x86/libweexjsc.so
index ab27aa9..3698a49 100755
Binary files a/android/sdk/libs/x86/libweexjsc.so and b/android/sdk/libs/x86/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
index 3a287cc..3ea86e2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
@@ -93,6 +93,7 @@ import com.taobao.weex.ui.module.WXMetaModule;
 import com.taobao.weex.ui.module.WXModalUIModule;
 import com.taobao.weex.ui.module.WXTimerModule;
 import com.taobao.weex.ui.module.WXWebViewModule;
+import com.taobao.weex.utils.LogLevel;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXSoInstallMgrSdk;
 import com.taobao.weex.utils.batch.BatchOperationHelper;
@@ -158,6 +159,15 @@ public class WXSDKEngine {
       }
       long start = System.currentTimeMillis();
       WXEnvironment.sSDKInitStart = start;
+      if(WXEnvironment.isApkDebugable()){
+        WXEnvironment.sLogLevel = LogLevel.DEBUG;
+      }else{
+		if(WXEnvironment.sApplication != null){
+		  WXEnvironment.sLogLevel = LogLevel.WARN;
+		}else {
+		  WXLogUtils.e(TAG,"WXEnvironment.sApplication is " + WXEnvironment.sApplication);
+		}
+      }
       doInitInternal(application,config);
       WXEnvironment.sSDKInitInvokeTime = System.currentTimeMillis()-start;
       WXLogUtils.renderPerformanceLog("SDKInitInvokeTime", WXEnvironment.sSDKInitInvokeTime);
@@ -167,6 +177,9 @@ public class WXSDKEngine {
 
   private static void doInitInternal(final Application application,final InitConfig config){
     WXEnvironment.sApplication = application;
+	if(application == null){
+	  WXLogUtils.e(TAG, " doInitInternal application is null");
+	}
     WXEnvironment.JsFrameworkInit = false;
 
     WXBridgeManager.getInstance().post(new Runnable() {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
index 9d88fc2..9586f2a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridge.java
@@ -36,6 +36,8 @@ class WXBridge implements IWXBridge {
 
   public static final String TAG = "WXBridge";
 
+  public static final boolean MULTIPROCESS = true;
+
   /**
    * Init JSFrameWork
    *
@@ -43,6 +45,13 @@ class WXBridge implements IWXBridge {
    */
   public native int initFramework(String framework, WXParams params);
 
+  /**
+   * Init JSFrameWork
+   *
+   * @param framework assets/main.js
+   */
+  public native int initFramework(String framework, WXParams params, String cacheDir, boolean pieSupport);
+
 
   /**
    * Execute JavaScript function
@@ -68,6 +77,14 @@ class WXBridge implements IWXBridge {
    */
   public native void takeHeapSnapshot(String filename);
 
+
+  public int initFrameworkEnv(String framework, WXParams params, String cacheDir, boolean pieSupport){
+    if (MULTIPROCESS) {
+      return initFramework(framework, params, cacheDir, pieSupport);
+    } else {
+      return  initFramework(framework, params);
+    }
+  }
   /**
    * JavaScript uses this methods to call Android code
    *


[06/18] incubator-weex git commit: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index a949e3b..3f0b6e3 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -19,6 +19,9 @@
 package com.taobao.weex.bridge;
 
 import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.os.Build;
 import android.os.Handler;
 import android.os.Handler.Callback;
 import android.os.Looper;
@@ -82,26 +85,26 @@ import static com.taobao.weex.bridge.WXModuleManager.getDomModule;
 /**
  * Manager class for communication between JavaScript and Android.
  * <ol>
- *   <li>
- *     Handle Android to JavaScript call, can be one of the following
- *     <ul>
- *       <li>{@link #createInstance(String, String, Map, String)}</li>
- *       <li>{@link #destroyInstance(String)}</li>
- *       <li>{@link #refreshInstance(String, WXRefreshData)}</li>
- *       <li>{@link #registerModules(Map)}</li>
- *       <li>{@link #registerComponents(List)}</li>
- *       <li>{@link #invokeCallJSBatch(Message)}</li>
- *     </ul>
- *   </li>
- *   <li>
- *     Handle JavaScript to Android call
- *   </li>
- *   <li>
- *     Handle next tick of message.
- *   </li>
+ * <li>
+ * Handle Android to JavaScript call, can be one of the following
+ * <ul>
+ * <li>{@link #createInstance(String, String, Map, String)}</li>
+ * <li>{@link #destroyInstance(String)}</li>
+ * <li>{@link #refreshInstance(String, WXRefreshData)}</li>
+ * <li>{@link #registerModules(Map)}</li>
+ * <li>{@link #registerComponents(List)}</li>
+ * <li>{@link #invokeCallJSBatch(Message)}</li>
+ * </ul>
+ * </li>
+ * <li>
+ * Handle JavaScript to Android call
+ * </li>
+ * <li>
+ * Handle next tick of message.
+ * </li>
  * </ol>
  */
-public class WXBridgeManager implements Callback,BactchExecutor {
+public class WXBridgeManager implements Callback, BactchExecutor {
 
   public static final String METHOD_CREATE_INSTANCE = "createInstance";
   public static final String METHOD_DESTROY_INSTANCE = "destroyInstance";
@@ -127,33 +130,28 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   public static final String KEY_PARAMS = "params";
   public static final String ARGS = "args";
   public static final String OPTIONS = "options";
+  public static final String INITLOGFILE = "/jsserver_start.log";
   private static final String NON_CALLBACK = "-1";
   private static final String UNDEFINED = "undefined";
-
   private static final int INIT_FRAMEWORK_OK = 1;
-
-  private static long LOW_MEM_VALUE = 120;
-
-  static volatile WXBridgeManager mBridgeManager;
-
   private static final int CRASHREINIT = 50;
+  static volatile WXBridgeManager mBridgeManager;
+  private static long LOW_MEM_VALUE = 120;
   private static int reInitCount = 1;
-
   private static String crashUrl = null;
   private static long lastCrashTime = 0;
-  public static final String INITLOGFILE = "/jsserver_start.log";
-
-
+  /**
+   * package
+   **/
+  Handler mJSHandler;
   /**
    * next tick tasks, can set priority
    */
   private WXHashMap<String, ArrayList<WXHashMap<String, Object>>> mNextTickTasks = new WXHashMap<>();
-
   /**
    * JSThread
    */
   private WXThread mJSThread;
-  /** package **/ Handler mJSHandler;
   private IWXBridge mWXBridge;
   private IWXDebugProxy mWxDebugProxy;
 
@@ -161,22 +159,13 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   /**
    * Whether JS Framework(main.js) has been initialized.
    */
-  private boolean mInit =false;
-
-  private boolean isJSFrameworkInit(){
-    return mInit;
-  }
-
+  private boolean mInit = false;
   private List<Map<String, Object>> mRegisterComponentFailList = new ArrayList<>(8);
   private List<Map<String, Object>> mRegisterModuleFailList = new ArrayList<>(8);
   private List<String> mRegisterServiceFailList = new ArrayList<>(8);
-
   private List<String> mDestroyedInstanceId = new ArrayList<>();
-
   private StringBuilder mLodBuilder = new StringBuilder(50);
-
   private Interceptor mInterceptor;
-
   private WXParams mInitParams;
 
   private WXBridgeManager() {
@@ -196,6 +185,10 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     return mBridgeManager;
   }
 
+  private boolean isJSFrameworkInit() {
+    return mInit;
+  }
+
   private void initWXBridge(boolean remoteDebug) {
     if (remoteDebug && WXEnvironment.isApkDebugable()) {
       WXEnvironment.sDebugServerConnectable = true;
@@ -212,7 +205,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
             Constructor constructor = clazz.getConstructor(Context.class, WXBridgeManager.class);
             if (constructor != null) {
               mWxDebugProxy = (IWXDebugProxy) constructor.newInstance(
-                      WXEnvironment.getApplication(), WXBridgeManager.this);
+                  WXEnvironment.getApplication(), WXBridgeManager.this);
               if (mWxDebugProxy != null) {
                 mWxDebugProxy.start();
               }
@@ -240,36 +233,36 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     }
   }
 
-    public Object callModuleMethod(String instanceId, String moduleStr, String methodStr, JSONArray args) {
-      return  callModuleMethod(instanceId, moduleStr, methodStr, args, null);
+  public Object callModuleMethod(String instanceId, String moduleStr, String methodStr, JSONArray args) {
+    return callModuleMethod(instanceId, moduleStr, methodStr, args, null);
   }
 
-    public Object callModuleMethod(String instanceId, String moduleStr, String methodStr, JSONArray args, JSONObject options) {
-      WXSDKInstance wxsdkInstance = WXSDKManager.getInstance()
-              .getSDKInstance(instanceId);
-      if (wxsdkInstance == null) {
+  public Object callModuleMethod(String instanceId, String moduleStr, String methodStr, JSONArray args, JSONObject options) {
+    WXSDKInstance wxsdkInstance = WXSDKManager.getInstance()
+        .getSDKInstance(instanceId);
+    if (wxsdkInstance == null) {
+      return null;
+    }
+    if (wxsdkInstance.isNeedValidate()
+        && WXSDKManager.getInstance().getValidateProcessor() != null) {
+      WXValidateProcessor.WXModuleValidateResult validateResult = WXSDKManager
+          .getInstance().getValidateProcessor()
+          .onModuleValidate(wxsdkInstance, moduleStr, methodStr, args, options);
+      if (validateResult == null) {
         return null;
       }
-      if (wxsdkInstance.isNeedValidate()
-              && WXSDKManager.getInstance().getValidateProcessor() != null) {
-          WXValidateProcessor.WXModuleValidateResult validateResult = WXSDKManager
-                  .getInstance().getValidateProcessor()
-                  .onModuleValidate(wxsdkInstance, moduleStr, methodStr, args, options);
-          if (validateResult == null) {
-              return null;
-          }
-          if (validateResult.isSuccess) {
-              return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr,
-                      args);
-          } else {
-              JSONObject validateInfo = validateResult.validateInfo;
-            if (validateInfo != null) {
-              WXLogUtils.e("[WXBridgeManager] module validate fail. >>> " + validateInfo.toJSONString());
-            }
-              return validateInfo;
-          }
+      if (validateResult.isSuccess) {
+        return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr,
+            args);
+      } else {
+        JSONObject validateInfo = validateResult.validateInfo;
+        if (validateInfo != null) {
+          WXLogUtils.e("[WXBridgeManager] module validate fail. >>> " + validateInfo.toJSONString());
+        }
+        return validateInfo;
       }
-      return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr, args);
+    }
+    return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr, args);
   }
 
   /**
@@ -282,6 +275,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
   /**
    * Set current Instance
+   *
    * @param instanceId {@link WXSDKInstance#mInstanceId}
    */
   public synchronized void setStackTopInstance(final String instanceId) {
@@ -295,12 +289,12 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   }
 
   @Override
-  public void post(Runnable r){
-    if(mInterceptor != null && mInterceptor.take(r)){
+  public void post(Runnable r) {
+    if (mInterceptor != null && mInterceptor.take(r)) {
       //task is token by the interceptor
       return;
     }
-    if (mJSHandler == null){
+    if (mJSHandler == null) {
       return;
     }
 
@@ -333,15 +327,15 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     mJSHandler.sendMessageDelayed(message, timerInfo.time);
   }
 
-  public void sendMessageDelayed(Message message, long delayMillis){
+  public void sendMessageDelayed(Message message, long delayMillis) {
     if (message == null || mJSHandler == null || mJSThread == null
         || !mJSThread.isWXThreadAlive() || mJSThread.getLooper() == null) {
       return;
     }
-    mJSHandler.sendMessageDelayed(message,delayMillis);
+    mJSHandler.sendMessageDelayed(message, delayMillis);
   }
 
-  public void removeMessage(int what,Object obj){
+  public void removeMessage(int what, Object obj) {
     if (mJSHandler == null || mJSThread == null
         || !mJSThread.isWXThreadAlive() || mJSThread.getLooper() == null) {
       return;
@@ -349,98 +343,97 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     mJSHandler.removeMessages(what, obj);
   }
 
-    public Object callNativeModule(String instanceId, String module, String method, JSONArray arguments, Object options) {
+  public Object callNativeModule(String instanceId, String module, String method, JSONArray arguments, Object options) {
 
-        if (WXEnvironment.isApkDebugable()) {
-            mLodBuilder.append("[WXBridgeManager] callNativeModule >>>> instanceId:").append(instanceId)
-                    .append(", module:").append(module).append(", method:").append(method).append(", arguments:").append(arguments);
-            WXLogUtils.d(mLodBuilder.substring(0));
-            mLodBuilder.setLength(0);
-        }
-
-        try {
-            if(WXDomModule.WXDOM.equals(module)){
-              WXDomModule dom = getDomModule(instanceId);
-              return dom.callDomMethod(method,arguments);
-            }else {
-              return callModuleMethod(instanceId, module,
-                      method, arguments);
-            }
-        } catch (Exception e) {
-            WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
-            commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
-        }
+    if (WXEnvironment.isApkDebugable()) {
+      mLodBuilder.append("[WXBridgeManager] callNativeModule >>>> instanceId:").append(instanceId)
+          .append(", module:").append(module).append(", method:").append(method).append(", arguments:").append(arguments);
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
+    }
 
-        return null;
+    try {
+      if (WXDomModule.WXDOM.equals(module)) {
+        WXDomModule dom = getDomModule(instanceId);
+        return dom.callDomMethod(method, arguments);
+      } else {
+        return callModuleMethod(instanceId, module,
+            method, arguments);
+      }
+    } catch (Exception e) {
+      WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
     }
-    public Object callNativeModule(String instanceId, String module,String method, JSONArray arguments, JSONObject options) {
 
-        if (WXEnvironment.isApkDebugable()) {
-            mLodBuilder.append("[WXBridgeManager] callNativeModule >>>> instanceId:").append(instanceId)
-                    .append(", module:").append(module).append(", method:").append(method).append(", arguments:").append(arguments);
-            WXLogUtils.d(mLodBuilder.substring(0));
-            mLodBuilder.setLength(0);
-        }
+    return null;
+  }
 
-        try {
-            if(WXDomModule.WXDOM.equals(module)){
-              WXDomModule dom = getDomModule(instanceId);
-              return dom.callDomMethod(method,arguments);
-            }else {
-              return callModuleMethod(instanceId, module,
-                      method, arguments, options);
-            }
-        } catch (Exception e) {
-            WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
-            commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
-        }
+  public Object callNativeModule(String instanceId, String module, String method, JSONArray arguments, JSONObject options) {
 
-        return null;
+    if (WXEnvironment.isApkDebugable()) {
+      mLodBuilder.append("[WXBridgeManager] callNativeModule >>>> instanceId:").append(instanceId)
+          .append(", module:").append(module).append(", method:").append(method).append(", arguments:").append(arguments);
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
     }
 
-    public Object callNativeComponent(String instanceId, String componentRef, String method, JSONArray arguments, Object options) {
-        if (WXEnvironment.isApkDebugable()) {
-            mLodBuilder.append("[WXBridgeManager] callNativeComponent >>>> instanceId:").append(instanceId)
-                    .append(", componentRef:").append(componentRef).append(", method:").append(method).append(", arguments:").append(arguments);
-            WXLogUtils.d(mLodBuilder.substring(0));
-            mLodBuilder.setLength(0);
-        }
-        try {
+    try {
+      if (WXDomModule.WXDOM.equals(module)) {
+        WXDomModule dom = getDomModule(instanceId);
+        return dom.callDomMethod(method, arguments);
+      } else {
+        return callModuleMethod(instanceId, module,
+            method, arguments, options);
+      }
+    } catch (Exception e) {
+      WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
+    }
 
-            WXDomModule dom = getDomModule(instanceId);
-            dom.invokeMethod(componentRef, method, arguments);
+    return null;
+  }
 
-        } catch (Exception e) {
-            WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
-            commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
-        }
-        return null;
+  public Object callNativeComponent(String instanceId, String componentRef, String method, JSONArray arguments, Object options) {
+    if (WXEnvironment.isApkDebugable()) {
+      mLodBuilder.append("[WXBridgeManager] callNativeComponent >>>> instanceId:").append(instanceId)
+          .append(", componentRef:").append(componentRef).append(", method:").append(method).append(", arguments:").append(arguments);
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
+    }
+    try {
+
+      WXDomModule dom = getDomModule(instanceId);
+      dom.invokeMethod(componentRef, method, arguments);
+
+    } catch (Exception e) {
+      WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
     }
+    return null;
+  }
 
   /**
    * Dispatch the native task to be executed.
-     *
+   *
    * @param instanceId {@link WXSDKInstance#mInstanceId}
-   * @param tasks tasks to be executed
-   * @param callback next tick id
+   * @param tasks      tasks to be executed
+   * @param callback   next tick id
    */
   public int callNative(String instanceId, String tasks, String callback) {
     if (TextUtils.isEmpty(tasks)) {
-      if (WXEnvironment.isApkDebugable()) {
-        WXLogUtils.e("[WXBridgeManager] callNative: call Native tasks is null");
-      }
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,"[WXBridgeManager] callNative: call Native tasks is null");
+      WXLogUtils.e("[WXBridgeManager] callNative: call Native tasks is null");
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNative: call Native tasks is null");
       return IWXBridge.INSTANCE_RENDERING_ERROR;
     }
 
     // if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("[WXBridgeManager] callNative >>>> instanceId:").append(instanceId)
-          .append(", tasks:").append(tasks).append(", callback:").append(callback);
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
+    mLodBuilder.append("[WXBridgeManager] callNative >>>> instanceId:").append(instanceId)
+        .append(", tasks:").append(tasks).append(", callback:").append(callback);
+    WXLogUtils.d(mLodBuilder.substring(0));
+    mLodBuilder.setLength(0);
     // }
 
-    if(mDestroyedInstanceId!=null &&mDestroyedInstanceId.contains(instanceId)){
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -450,7 +443,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     JSONArray array = JSON.parseArray(tasks);
     parseNanos = System.nanoTime() - parseNanos;
 
-    if(WXSDKManager.getInstance().getSDKInstance(instanceId)!=null) {
+    if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
       WXSDKManager.getInstance().getSDKInstance(instanceId).jsonParseTime(System.currentTimeMillis() - start);
     }
 
@@ -462,27 +455,27 @@ public class WXBridgeManager implements Callback,BactchExecutor {
           task = (JSONObject) array.get(i);
           if (task != null && WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
             Object target = task.get(MODULE);
-            if(target != null){
-              if(WXDomModule.WXDOM.equals(target)){
+            if (target != null) {
+              if (WXDomModule.WXDOM.equals(target)) {
                 WXDomModule dom = getDomModule(instanceId);
-                dom.callDomMethod(task,parseNanos);
-              }else {
+                dom.callDomMethod(task, parseNanos);
+              } else {
                 JSONObject optionObj = task.getJSONObject(OPTIONS);
                 callModuleMethod(instanceId, (String) target,
-                        (String) task.get(METHOD), (JSONArray) task.get(ARGS), optionObj);
+                    (String) task.get(METHOD), (JSONArray) task.get(ARGS), optionObj);
               }
-            }else if(task.get(COMPONENT) != null){
+            } else if (task.get(COMPONENT) != null) {
               //call component
               WXDomModule dom = getDomModule(instanceId);
-              dom.invokeMethod((String) task.get(REF),(String) task.get(METHOD),(JSONArray) task.get(ARGS));
-            }else{
+              dom.invokeMethod((String) task.get(REF), (String) task.get(METHOD), (JSONArray) task.get(ARGS));
+            } else {
               throw new IllegalArgumentException("unknown callNative");
             }
           }
         }
       } catch (Exception e) {
         WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
-        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,"[WXBridgeManager] callNative exception "+e.getCause());
+        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNative exception " + e.getCause());
       }
     }
 
@@ -498,21 +491,21 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   public int callCreateBody(String instanceId, String tasks, String callback) {
     if (TextUtils.isEmpty(tasks)) {
       // if (WXEnvironment.isApkDebugable()) {
-        WXLogUtils.d("[WXBridgeManager] callCreateBody: call CreateBody tasks is null");
+      WXLogUtils.d("[WXBridgeManager] callCreateBody: call CreateBody tasks is null");
       // }
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_CREATEBODY,"[WXBridgeManager] callCreateBody: call CreateBody tasks is null");
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_CREATEBODY, "[WXBridgeManager] callCreateBody: call CreateBody tasks is null");
       return IWXBridge.INSTANCE_RENDERING_ERROR;
     }
 
     // if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("[WXBridgeManager] callCreateBody >>>> instanceId:").append(instanceId)
-              .append(", tasks:").append(tasks).append(", callback:").append(callback);
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
+    mLodBuilder.append("[WXBridgeManager] callCreateBody >>>> instanceId:").append(instanceId)
+        .append(", tasks:").append(tasks).append(", callback:").append(callback);
+    WXLogUtils.d(mLodBuilder.substring(0));
+    mLodBuilder.setLength(0);
     // }
 
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)){
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -525,7 +518,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getCreateBody(domObject);
-        domModule.postAction((DOMAction)action, true);
+        domModule.postAction((DOMAction) action, true);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).mParseJsonNanos = nanosTemp;
@@ -534,8 +527,8 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         }
       }
     } catch (Exception e) {
-        WXLogUtils.e("[WXBridgeManager] callCreateBody exception: ", e);
-        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_CREATEBODY,"[WXBridgeManager] callCreateBody exception "+e.getCause());
+      WXLogUtils.e("[WXBridgeManager] callCreateBody exception: ", e);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_CREATEBODY, "[WXBridgeManager] callCreateBody exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -551,12 +544,12 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   public int callUpdateFinish(String instanceId, String callback) {
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callUpdateFinish >>>> instanceId:").append(instanceId)
-              .append(", callback:").append(callback);
+          .append(", callback:").append(callback);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)){
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -564,11 +557,11 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getUpdateFinish();
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callUpdateFinish exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,"[WXBridgeManager] callUpdateFinish exception "+e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callUpdateFinish exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -582,13 +575,13 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   // callCreateFinish
   public int callCreateFinish(String instanceId, String callback) {
     // if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("[WXBridgeManager] callCreateFinish >>>> instanceId:").append(instanceId)
-              .append(", callback:").append(callback);
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
+    mLodBuilder.append("[WXBridgeManager] callCreateFinish >>>> instanceId:").append(instanceId)
+        .append(", callback:").append(callback);
+    WXLogUtils.d(mLodBuilder.substring(0));
+    mLodBuilder.setLength(0);
     // }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -596,11 +589,11 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getCreateFinish();
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callCreateFinish exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERROR_DOM_CREATEFINISH,"[WXBridgeManager] callCreateFinish exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERROR_DOM_CREATEFINISH, "[WXBridgeManager] callCreateFinish exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -616,12 +609,12 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   public int callRefreshFinish(String instanceId, String callback) {
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callRefreshFinish >>>> instanceId:").append(instanceId)
-              .append(", callback:").append(callback);
+          .append(", callback:").append(callback);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -629,11 +622,11 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getRefreshFinish();
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callRefreshFinish exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERROR_DOM_REFRESHFINISH,"[WXBridgeManager] callRefreshFinish exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERROR_DOM_REFRESHFINISH, "[WXBridgeManager] callRefreshFinish exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -648,22 +641,20 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   // callUpdateAttrs
   public int callUpdateAttrs(String instanceId, String ref, String task, String callback) {
     if (TextUtils.isEmpty(task)) {
-      if (WXEnvironment.isApkDebugable()) {
-        WXLogUtils.e("[WXBridgeManager] callUpdateAttrs: call UpdateAttrs tasks is null");
-      }
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATEATTRS,"[WXBridgeManager] callUpdateAttrs: call UpdateAttrs tasks is null");
+      WXLogUtils.e("[WXBridgeManager] callUpdateAttrs: call UpdateAttrs tasks is null");
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATEATTRS, "[WXBridgeManager] callUpdateAttrs: call UpdateAttrs tasks is null");
       return IWXBridge.INSTANCE_RENDERING_ERROR;
     }
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callUpdateAttrs >>>> instanceId:").append(instanceId)
-              .append(", ref:").append(ref)
-              .append(", task:").append(task)
-              .append(", callback:").append(callback);
+          .append(", ref:").append(ref)
+          .append(", task:").append(task)
+          .append(", callback:").append(callback);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -676,7 +667,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         parseNanos = System.nanoTime() - parseNanos;
 
         Action action = Actions.getUpdateAttrs(ref, domObject);
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).mStartMillis = start;
@@ -686,7 +677,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callUpdateAttrs exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATEATTRS,"[WXBridgeManager] callUpdateAttrs exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATEATTRS, "[WXBridgeManager] callUpdateAttrs exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -701,22 +692,20 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   // callUpdateStyle
   public int callUpdateStyle(String instanceId, String ref, String task, String callback) {
     if (TextUtils.isEmpty(task)) {
-      if (WXEnvironment.isApkDebugable()) {
-        WXLogUtils.e("[WXBridgeManager] callUpdateStyle: call UpdateStyle tasks is null");
-      }
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATESTYLE,"[WXBridgeManager] callUpdateStyle: call UpdateStyle tasks is null");
+      WXLogUtils.e("[WXBridgeManager] callUpdateStyle: call UpdateStyle tasks is null");
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATESTYLE, "[WXBridgeManager] callUpdateStyle: call UpdateStyle tasks is null");
       return IWXBridge.INSTANCE_RENDERING_ERROR;
     }
-//    if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("[WXBridgeManager] callUpdateStyle >>>> instanceId:").append(instanceId)
-              .append(", ref:").append(ref)
-              .append(", task:").append(task)
-              .append(", callback:").append(callback);
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
-//    }
+   if (WXEnvironment.isApkDebugable()) {
+    mLodBuilder.append("[WXBridgeManager] callUpdateStyle >>>> instanceId:").append(instanceId)
+        .append(", ref:").append(ref)
+        .append(", task:").append(task)
+        .append(", callback:").append(callback);
+    WXLogUtils.d(mLodBuilder.substring(0));
+    mLodBuilder.setLength(0);
+    }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -729,7 +718,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         nanosTemp = System.nanoTime() - nanosTemp;
 
         Action action = Actions.getUpdateStyle(ref, domObject, false);
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).mParseJsonNanos = nanosTemp;
@@ -739,7 +728,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callUpdateStyle exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATESTYLE,"[WXBridgeManager] callUpdateStyle exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATESTYLE, "[WXBridgeManager] callUpdateStyle exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -755,12 +744,12 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callRemoveElement >>>> instanceId:").append(instanceId)
-              .append(", ref:").append(ref);
+          .append(", ref:").append(ref);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -768,7 +757,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getRemoveElement(ref);
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).onStartDomExecute(instanceId, "removeElement", ref, null, ref);
@@ -776,7 +765,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callRemoveElement exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT,"[WXBridgeManager] callRemoveElement exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT, "[WXBridgeManager] callRemoveElement exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -792,14 +781,14 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callMoveElement >>>> instanceId:").append(instanceId)
-              .append(", parentref:").append(parentref)
-              .append(", index:").append(index)
-              .append(", ref:").append(ref);
+          .append(", parentref:").append(parentref)
+          .append(", index:").append(index)
+          .append(", ref:").append(ref);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -807,11 +796,11 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getMoveElement(ref, parentref, Integer.parseInt(index));
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callMoveElement exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_MOVEELEMENT,"[WXBridgeManager] callMoveElement exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_MOVEELEMENT, "[WXBridgeManager] callMoveElement exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -825,14 +814,14 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   public int callAddEvent(String instanceId, String ref, String event, String callback) {
 
 //    if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("[WXBridgeManager] callAddEvent >>>> instanceId:").append(instanceId)
-              .append(", ref:").append(ref)
-              .append(", event:").append(event);
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
+    mLodBuilder.append("[WXBridgeManager] callAddEvent >>>> instanceId:").append(instanceId)
+        .append(", ref:").append(ref)
+        .append(", event:").append(event);
+    WXLogUtils.d(mLodBuilder.substring(0));
+    mLodBuilder.setLength(0);
 //    }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -840,7 +829,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getAddEvent(ref, event);
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).onStartDomExecute(instanceId, "addEvent", ref, null, event);
@@ -848,7 +837,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callAddEvent exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_ADDEVENT,"[WXBridgeManager] callAddEvent exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_ADDEVENT, "[WXBridgeManager] callAddEvent exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -863,21 +852,21 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callRemoveEvent >>>> instanceId:").append(instanceId)
-              .append(", ref:").append(ref)
-              .append(", event:").append(event);
+          .append(", ref:").append(ref)
+          .append(", event:").append(event);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
-      return IWXBridge .DESTROY_INSTANCE;
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+      return IWXBridge.DESTROY_INSTANCE;
     }
 
     try {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getRemoveEvent(ref, event);
-        domModule.postAction((DOMAction)action, false);
+        domModule.postAction((DOMAction) action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).onStartDomExecute(instanceId, "removeEvent", ref, null, event);
@@ -885,7 +874,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callRemoveEvent exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEEVENT,"[WXBridgeManager] callRemoveEvent exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEEVENT, "[WXBridgeManager] callRemoveEvent exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -896,16 +885,16 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     return IWXBridge.INSTANCE_RENDERING;
   }
 
-  public int callAddElement(String instanceId, String ref,String dom,String index, String callback){
+  public int callAddElement(String instanceId, String ref, String dom, String index, String callback) {
 
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callNative::callAddElement >>>> instanceId:").append(instanceId)
-              .append(", ref:").append(ref).append(", dom:").append(dom).append(", callback:").append(callback);
+          .append(", ref:").append(ref).append(", dom:").append(dom).append(", callback:").append(callback);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if(mDestroyedInstanceId!=null && mDestroyedInstanceId.contains(instanceId)){
+    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -920,7 +909,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         WXSDKManager.getInstance().getSDKInstance(instanceId).jsonParseTime(System.currentTimeMillis() - start);
       }
       WXDomModule domModule = getDomModule(instanceId);
-      DOMAction addElementAction = Actions.getAddElement(domObject, ref,Integer.parseInt(index));
+      DOMAction addElementAction = Actions.getAddElement(domObject, ref, Integer.parseInt(index));
       domModule.postAction(addElementAction, false);
 
       if (WXTracing.isAvailable() && addElementAction instanceof TraceableAction) {
@@ -940,57 +929,57 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   }
 
   public int callReportCrashReloadPage(String instanceId, String crashFile) {
+    try {
+      String url = null;
+      WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
+      if (instance != null) {
+        url = instance.getBundleUrl();
+      }
       try {
-        String url = null;
-        WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
-        if (instance != null) {
-          url = instance.getBundleUrl();
-        }
-        try {
-            if (WXEnvironment.getApplication() != null) {
-                crashFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath() + crashFile;
-                // Log.e("jsengine", "callReportCrashReloadPage crashFile:" + crashFile);
-            }
-        } catch (Throwable e) {
-            e.printStackTrace();
-        }
-        callReportCrash(crashFile, instanceId, url);
-        if (reInitCount > CRASHREINIT) {
-          return IWXBridge.INSTANCE_RENDERING_ERROR;
-        }
-        reInitCount++;
-        // reinit frame work
-        mInit = false;
-        initScriptsFramework("");
-
-        if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
-          return IWXBridge.DESTROY_INSTANCE;
+        if (WXEnvironment.getApplication() != null) {
+          crashFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath() + crashFile;
+          // Log.e("jsengine", "callReportCrashReloadPage crashFile:" + crashFile);
         }
-      } catch (Exception e) {
-        WXLogUtils.e("[WXBridgeManager] callReportCrashReloadPage exception: ", e);
+      } catch (Throwable e) {
+        e.printStackTrace();
       }
-      try {
+      callReportCrash(crashFile, instanceId, url);
+      if (reInitCount > CRASHREINIT) {
+        return IWXBridge.INSTANCE_RENDERING_ERROR;
+      }
+      reInitCount++;
+      // reinit frame work
+      mInit = false;
+      initScriptsFramework("");
 
-          if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
-              boolean reloadThisInstance = shouReloadCurrentInstance(
-                      WXSDKManager.getInstance().getSDKInstance(instanceId).getBundleUrl());
-              WXDomModule domModule = getDomModule(instanceId);
-              Action action = Actions.getReloadPage(instanceId, reloadThisInstance);
-              domModule.postAction((DOMAction) action, true);
-          }
+      if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+        return IWXBridge.DESTROY_INSTANCE;
+      }
+    } catch (Exception e) {
+      WXLogUtils.e("[WXBridgeManager] callReportCrashReloadPage exception: ", e);
+    }
+    try {
 
-      } catch (Exception e) {
-          WXLogUtils.e("[WXBridgeManager] callReloadPage exception: ", e);
-          commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_RELOAD_PAGE,"[WXBridgeManager] callReloadPage exception "+e.getCause());
+      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
+        boolean reloadThisInstance = shouReloadCurrentInstance(
+            WXSDKManager.getInstance().getSDKInstance(instanceId).getBundleUrl());
+        WXDomModule domModule = getDomModule(instanceId);
+        Action action = Actions.getReloadPage(instanceId, reloadThisInstance);
+        domModule.postAction((DOMAction) action, true);
       }
-      return IWXBridge.INSTANCE_RENDERING_ERROR;
+
+    } catch (Exception e) {
+      WXLogUtils.e("[WXBridgeManager] callReloadPage exception: ", e);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_RELOAD_PAGE, "[WXBridgeManager] callReloadPage exception " + e.getCause());
+    }
+    return IWXBridge.INSTANCE_RENDERING_ERROR;
   }
 
   public boolean shouReloadCurrentInstance(String aUrl) {
     long time = System.currentTimeMillis();
     if (crashUrl == null ||
-            (crashUrl != null && !crashUrl.equals(aUrl)) ||
-            ((time - lastCrashTime) > 15000)) {
+        (crashUrl != null && !crashUrl.equals(aUrl)) ||
+        ((time - lastCrashTime) > 15000)) {
       crashUrl = aUrl;
       lastCrashTime = time;
       return true;
@@ -1000,49 +989,46 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   }
 
   public void callReportCrash(String crashFile, final String instanceId, final String url) {
-      // statistic weexjsc process crash
-      Date date = new Date();
-      DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
-      String time = format.format(date);
-      final String origin_filename = crashFile + "." + time;
-      File oldfile = new File(crashFile);
-      File newfile = new File(origin_filename);
-      if (oldfile.exists()) {
-          oldfile.renameTo(newfile);
-      }
-      Thread t = new Thread(new Runnable() {
-           public void run() {
+    // statistic weexjsc process crash
+    Date date = new Date();
+    DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
+    String time = format.format(date);
+    final String origin_filename = crashFile + "." + time;
+    File oldfile = new File(crashFile);
+    File newfile = new File(origin_filename);
+    if (oldfile.exists()) {
+      oldfile.renameTo(newfile);
+    }
+    Thread t = new Thread(new Runnable() {
+      public void run() {
+        try {
+          File file = new File(origin_filename);
+          if (file.exists()) {
+            if (file.length() > 0) {
+              StringBuilder result = new StringBuilder();
               try {
-                File file = new File(origin_filename);
-                if (file.exists()) {
-                  if (file.length() > 0) {
-                    StringBuilder result = new StringBuilder();
-                    try{
-                      BufferedReader br = new BufferedReader(new FileReader(origin_filename));
-                      String s = null;
-                      // boolean foundStart = false;
-                      while((s = br.readLine()) != null) {
-                        if ("".equals(s)) {
-                          continue;
-                        }
-                        // 寄存器内容裁剪
-                        // if (("r0:").equals(s)) {
-                        //  break;
-                        // }
-                        result.append(s + "\n");
-                      }
-                      commitJscCrashAlarmMonitor(IWXUserTrackAdapter.JS_BRIDGE,  WXErrorCode.WX_ERR_JSC_CRASH, result.toString(), instanceId, url);
-                      br.close();
-                    } catch(Exception e) {
-                      e.printStackTrace();
-                    }
-                  } else {
-                    WXLogUtils.e("[WXBridgeManager] callReportCrash crash file is empty");
-                    // 没收集到crash堆栈不上传
-                    // commitJscCrashAlarmMonitor(IWXUserTrackAdapter.JS_BRIDGE,  WXErrorCode.WX_ERR_JSC_CRASH, "crash info file empty", instanceId, url);
+                BufferedReader br = new BufferedReader(new FileReader(origin_filename));
+                String s = null;
+                // boolean foundStart = false;
+                while ((s = br.readLine()) != null) {
+                  if ("".equals(s)) {
+                    continue;
                   }
-                  file.delete();
+                  // if (("r0:").equals(s)) {
+                  //  break;
+                  // }
+                  result.append(s + "\n");
                 }
+                commitJscCrashAlarmMonitor(IWXUserTrackAdapter.JS_BRIDGE, WXErrorCode.WX_ERR_JSC_CRASH, result.toString(), instanceId, url);
+                br.close();
+              } catch (Exception e) {
+                e.printStackTrace();
+              }
+            } else {
+              WXLogUtils.e("[WXBridgeManager] callReportCrash crash file is empty");
+            }
+            file.delete();
+          }
 //                  Log.e("reportServerCrash", "WXBridge reportServerCrash crashFile:" + origin_filename);
 //                  String filename = CRASHPATH;
 //                  File oldfile = new File(origin_filename);
@@ -1069,17 +1055,17 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 //                  } else {
 //                      Log.e("reportServerCrash", "WXBridge /data/data/com.taobao.taobao/app_tombstone/com.taobao.taobao/crashsdk/logs not exsist");
 //                  }
-              } catch (Throwable throwable) {
-                  WXLogUtils.e("[WXBridgeManager] callReportCrash exception: ", throwable);
-              }
-          }
-      });
-      t.start();
+        } catch (Throwable throwable) {
+          WXLogUtils.e("[WXBridgeManager] callReportCrash exception: ", throwable);
+        }
+      }
+    });
+    t.start();
 
   }
 
   private void getNextTick(final String instanceId, final String callback) {
-    addJSTask(METHOD_CALLBACK,instanceId, callback, "{}");
+    addJSTask(METHOD_CALLBACK, instanceId, callback, "{}");
     sendMessage(instanceId, WXJSBridgeMsgType.CALL_JS_BATCH);
   }
 
@@ -1094,12 +1080,12 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
         ArrayList<Object> argsList = new ArrayList<>();
         for (Object arg : args) {
-            argsList.add(arg);
+          argsList.add(arg);
         }
-        if(params != null){
-           ArrayMap map = new ArrayMap(4);
-           map.put(KEY_PARAMS, params);
-           argsList.add(map);
+        if (params != null) {
+          ArrayMap map = new ArrayMap(4);
+          map.put(KEY_PARAMS, params);
+          argsList.add(map);
         }
 
         WXHashMap<String, Object> task = new WXHashMap<>();
@@ -1131,6 +1117,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
   /**
    * Initialize JavaScript framework
+   *
    * @param framework String representation of the framework to be init.
    */
   public synchronized void initScriptsFramework(String framework) {
@@ -1143,12 +1130,13 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
   @Deprecated
   public void fireEvent(final String instanceId, final String ref,
-                        final String type, final Map<String, Object> data){
+                        final String type, final Map<String, Object> data) {
     this.fireEvent(instanceId, ref, type, data, null);
   }
 
   /**
    * Do not direct invoke this method in Components, use {@link WXSDKInstance#fireEvent(String, String, Map, Map)} instead.
+   *
    * @param instanceId
    * @param ref
    * @param type
@@ -1157,16 +1145,16 @@ public class WXBridgeManager implements Callback,BactchExecutor {
    */
   @Deprecated
   public void fireEvent(final String instanceId, final String ref,
-                        final String type, final Map<String, Object> data,final Map<String, Object> domChanges) {
-    fireEventOnNode(instanceId,ref,type,data,domChanges);
+                        final String type, final Map<String, Object> data, final Map<String, Object> domChanges) {
+    fireEventOnNode(instanceId, ref, type, data, domChanges);
   }
 
   /**
    * Notify the JavaScript about the event happened on Android
    */
   public void fireEventOnNode(final String instanceId, final String ref,
-                        final String type, final Map<String, Object> data,final Map<String, Object> domChanges) {
-      fireEventOnNode(instanceId, ref, type, data, domChanges, null);
+                              final String type, final Map<String, Object> data, final Map<String, Object> domChanges) {
+    fireEventOnNode(instanceId, ref, type, data, domChanges, null);
   }
 
   /**
@@ -1176,12 +1164,12 @@ public class WXBridgeManager implements Callback,BactchExecutor {
                               final String type, final Map<String, Object> data,
                               final Map<String, Object> domChanges, List<Object> params) {
     if (TextUtils.isEmpty(instanceId) || TextUtils.isEmpty(ref)
-            || TextUtils.isEmpty(type) || mJSHandler == null) {
+        || TextUtils.isEmpty(type) || mJSHandler == null) {
       return;
     }
     if (!checkMainThread()) {
       throw new WXRuntimeException(
-              "fireEvent must be called by main thread");
+          "fireEvent must be called by main thread");
     }
     addJSEventTask(METHOD_FIRE_EVENT, instanceId, params, ref, type, data, domChanges);
     sendMessage(instanceId, WXJSBridgeMsgType.CALL_JS_BATCH);
@@ -1194,11 +1182,12 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
   /**
    * Invoke JavaScript callback. Use {@link JSCallback} instead.
+   *
    * @see #callback(String, String, String)
    */
   @Deprecated
-  public void callback(String instanceId, String callback,String data) {
-    callback(instanceId, callback,data,false);
+  public void callback(String instanceId, String callback, String data) {
+    callback(instanceId, callback, data, false);
   }
 
   /**
@@ -1206,29 +1195,31 @@ public class WXBridgeManager implements Callback,BactchExecutor {
    */
   @Deprecated
   public void callback(final String instanceId, final String callback,
-                       final Map<String, Object> data){
-    callback(instanceId,callback,data,false);
+                       final Map<String, Object> data) {
+    callback(instanceId, callback, data, false);
   }
 
   /**
    * Use {@link JSCallback} instead.
+   *
    * @param instanceId Weex Instance Id
-   * @param callback  callback referenece handle
-   * @param data callback data
-   * @param keepAlive if keep callback instance alive for later use
-     */
+   * @param callback   callback referenece handle
+   * @param data       callback data
+   * @param keepAlive  if keep callback instance alive for later use
+   */
   @Deprecated
   public void callback(final String instanceId, final String callback,
-                       final Object data,boolean keepAlive) {
-    callbackJavascript(instanceId,callback,data,keepAlive);
+                       final Object data, boolean keepAlive) {
+    callbackJavascript(instanceId, callback, data, keepAlive);
   }
 
   /**
    * Callback to Javascript function.
+   *
    * @param instanceId Weex Instance Id
-   * @param callback  callback referenece handle
-   * @param data callback data
-   * @param keepAlive if keep callback instance alive for later use
+   * @param callback   callback referenece handle
+   * @param data       callback data
+   * @param keepAlive  if keep callback instance alive for later use
    */
   void callbackJavascript(final String instanceId, final String callback,
                           final Object data, boolean keepAlive) {
@@ -1237,7 +1228,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       return;
     }
 
-    addJSTask(METHOD_CALLBACK, instanceId, callback, data,keepAlive);
+    addJSTask(METHOD_CALLBACK, instanceId, callback, data, keepAlive);
     sendMessage(instanceId, WXJSBridgeMsgType.CALL_JS_BATCH);
   }
 
@@ -1262,32 +1253,32 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
         if (instance != null) {
           instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR,
-                                 "createInstance failed!");
+              "createInstance failed!");
         }
         String err = "[WXBridgeManager] invokeRefreshInstance: framework.js uninitialized.";
-        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
+        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
         WXLogUtils.d(err);
         return;
       }
       long start = System.currentTimeMillis();
       if (WXEnvironment.isApkDebugable()) {
         WXLogUtils.d("refreshInstance >>>> instanceId:" + instanceId
-                     + ", data:" + refreshData.data + ", isDirty:" + refreshData.isDirty);
+            + ", data:" + refreshData.data + ", isDirty:" + refreshData.isDirty);
       }
 
       if (refreshData.isDirty) {
         return;
       }
       WXJSObject instanceIdObj = new WXJSObject(WXJSObject.String,
-                                                instanceId);
+          instanceId);
       WXJSObject dataObj = new WXJSObject(WXJSObject.JSON,
-                                          refreshData.data == null ? "{}" : refreshData.data);
+          refreshData.data == null ? "{}" : refreshData.data);
       WXJSObject[] args = {instanceIdObj, dataObj};
       invokeExecJS(instanceId, null, METHOD_REFRESH_INSTANCE, args);
       WXLogUtils.renderPerformanceLog("invokeRefreshInstance", System.currentTimeMillis() - start);
     } catch (Throwable e) {
       String err = "[WXBridgeManager] invokeRefreshInstance " + e.getCause();
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
       WXLogUtils.e(err);
     }
   }
@@ -1307,11 +1298,11 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       return;
     }
     WXPerformance performance = new WXPerformance();
-    performance.args=instance.getBundleUrl();
-    performance.errCode=errCode.getErrorCode();
+    performance.args = instance.getBundleUrl();
+    performance.errCode = errCode.getErrorCode();
     if (errCode != WXErrorCode.WX_SUCCESS) {
-      performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errCode.getErrorMsg():errMsg);
-      WXLogUtils.e("wx_monitor",performance.toString());
+      performance.appendErrMsg(TextUtils.isEmpty(errMsg) ? errCode.getErrorMsg() : errMsg);
+      WXLogUtils.e("wx_monitor", performance.toString());
     }
     adapter.commit(WXEnvironment.getApplication(), null, IWXUserTrackAdapter.JS_BRIDGE, performance, instance.getUserTrackParams());
   }
@@ -1333,8 +1324,8 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     WXPerformance performance = new WXPerformance();
     performance.errCode = errorCode.getErrorCode();
     if (errorCode != WXErrorCode.WX_SUCCESS) {
-      performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errorCode.getErrorMsg():errMsg);
-      WXLogUtils.e("wx_monitor",performance.toString());
+      performance.appendErrMsg(TextUtils.isEmpty(errMsg) ? errorCode.getErrorMsg() : errMsg);
+      WXLogUtils.e("wx_monitor", performance.toString());
     }
     userTrackAdapter.commit(WXEnvironment.getApplication(), null, type, performance, null);
   }
@@ -1348,15 +1339,15 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
     String method = "callReportCrash";
     String exception = "weexjsc process crash and restart exception";
-    Map<String,String> extParams = new HashMap<String, String>();
+    Map<String, String> extParams = new HashMap<String, String>();
     extParams.put("jscCrashStack", errMsg);
     IWXJSExceptionAdapter adapter = WXSDKManager.getInstance().getIWXJSExceptionAdapter();
     if (adapter != null) {
-        WXJSExceptionInfo jsException = new WXJSExceptionInfo(instanceId, url, errorCode.getErrorCode(), method, exception, extParams);
-        adapter.onJSException(jsException);
-        // if (WXEnvironment.isApkDebugable()) {
-          WXLogUtils.e(jsException.toString());
-        // }
+      WXJSExceptionInfo jsException = new WXJSExceptionInfo(instanceId, url, errorCode.getErrorCode(), method, exception, extParams);
+      adapter.onJSException(jsException);
+      // if (WXEnvironment.isApkDebugable()) {
+      WXLogUtils.e(jsException.toString());
+      // }
     }
   }
 
@@ -1366,15 +1357,27 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   public void createInstance(final String instanceId, final String template,
                              final Map<String, Object> options, final String data) {
     final WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
-    if(instance == null){
-      WXLogUtils.e("WXBridgeManager","createInstance failed, SDKInstance is not exist");
+    if (instance == null) {
+      WXLogUtils.e("WXBridgeManager", "createInstance failed, SDKInstance is not exist");
       return;
     }
-    if ( TextUtils.isEmpty(instanceId)
+    if (TextUtils.isEmpty(instanceId)
         || TextUtils.isEmpty(template) || mJSHandler == null) {
       instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR, "createInstance fail!");
       return;
     }
+
+    if (!isJSFrameworkInit() && reInitCount == 1) {
+      instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR, "createInstance fail!");
+      post(new Runnable() {
+        @Override
+        public void run() {
+          initFramework("");
+        }
+      }, instanceId);
+      return;
+    }
+
     WXModuleManager.createDomModule(instance);
     post(new Runnable() {
       @Override
@@ -1386,7 +1389,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
           @Override
           public void run() {
-              instance.createInstanceFinished(totalTime);
+            instance.createInstanceFinished(totalTime);
           }
         }, 0);
       }
@@ -1403,37 +1406,37 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     } else {
       if (!isJSFrameworkInit()) {
         instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR, "createInstance "
-                                                                             + "fail!");
+            + "fail!");
         String err = "[WXBridgeManager] invokeCreateInstance: framework.js uninitialized.";
-        commitJSBridgeAlarmMonitor(instance.getInstanceId(), WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
+        commitJSBridgeAlarmMonitor(instance.getInstanceId(), WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
         WXLogUtils.e(err);
         return;
       }
       try {
         if (WXEnvironment.isApkDebugable()) {
           WXLogUtils.d("createInstance >>>> instanceId:" + instance.getInstanceId()
-                       + ", options:"
-                       + WXJsonUtils.fromObjectToJSONString(options)
-                       + ", data:" + data);
+              + ", options:"
+              + WXJsonUtils.fromObjectToJSONString(options)
+              + ", data:" + data);
         }
         WXJSObject instanceIdObj = new WXJSObject(WXJSObject.String,
-                instance.getInstanceId());
+            instance.getInstanceId());
         WXJSObject instanceObj = new WXJSObject(WXJSObject.String,
-                                                template);
+            template);
         WXJSObject optionsObj = new WXJSObject(WXJSObject.JSON,
-                options == null ? "{}"
-                        : WXJsonUtils.fromObjectToJSONString(options));
+            options == null ? "{}"
+                : WXJsonUtils.fromObjectToJSONString(options));
         WXJSObject dataObj = new WXJSObject(WXJSObject.JSON,
-                data == null ? "{}" : data);
+            data == null ? "{}" : data);
         WXJSObject[] args = {instanceIdObj, instanceObj, optionsObj,
-                dataObj};
-        invokeExecJS(instance.getInstanceId(), null, METHOD_CREATE_INSTANCE, args,false);
+            dataObj};
+        invokeExecJS(instance.getInstanceId(), null, METHOD_CREATE_INSTANCE, args, false);
       } catch (Throwable e) {
         instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR,
-                                 "createInstance failed!");
+            "createInstance failed!");
         String err = "[WXBridgeManager] invokeCreateInstance " + e.getCause()
-                + " template md5 " + WXFileUtils.md5(template) + " length " + (template == null ? 0 : template.length());
-        commitJSBridgeAlarmMonitor(instance.getInstanceId(), WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
+            + " template md5 " + WXFileUtils.md5(template) + " length " + (template == null ? 0 : template.length());
+        commitJSBridgeAlarmMonitor(instance.getInstanceId(), WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
         WXLogUtils.e(err);
       }
     }
@@ -1444,11 +1447,11 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   }
 
   public void destroyInstance(final String instanceId) {
-    if ( mJSHandler == null
+    if (mJSHandler == null
         || TextUtils.isEmpty(instanceId)) {
       return;
     }
-    if(mDestroyedInstanceId!=null) {
+    if (mDestroyedInstanceId != null) {
       mDestroyedInstanceId.add(instanceId);
     }
     // clear message with instanceId
@@ -1472,12 +1475,12 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         WXLogUtils.d("destroyInstance >>>> instanceId:" + instanceId);
       }
       WXJSObject instanceIdObj = new WXJSObject(WXJSObject.String,
-                                                instanceId);
+          instanceId);
       WXJSObject[] args = {instanceIdObj};
       invokeExecJS(instanceId, null, METHOD_DESTROY_INSTANCE, args);
     } catch (Throwable e) {
       String err = "[WXBridgeManager] invokeDestroyInstance " + e.getCause();
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
       WXLogUtils.e(err);
     }
   }
@@ -1498,7 +1501,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         break;
       case WXJSBridgeMsgType.SET_TIMEOUT:
         TimerInfo timerInfo = (TimerInfo) msg.obj;
-        if(timerInfo == null){
+        if (timerInfo == null) {
           break;
         }
         WXJSObject obj = new WXJSObject(WXJSObject.String, timerInfo.callbackId);
@@ -1522,14 +1525,14 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   }
 
   public void invokeExecJS(String instanceId, String namespace, String function,
-                            WXJSObject[] args,boolean logTaskDetail){
+                           WXJSObject[] args, boolean logTaskDetail) {
     // if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("callJS >>>> instanceId:").append(instanceId)
-              .append("function:").append(function);
-      if(logTaskDetail)
-        mLodBuilder.append(" tasks:").append(WXJsonUtils.fromObjectToJSONString(args));
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
+    mLodBuilder.append("callJS >>>> instanceId:").append(instanceId)
+        .append("function:").append(function);
+    if (logTaskDetail)
+      mLodBuilder.append(" tasks:").append(WXJsonUtils.fromObjectToJSONString(args));
+    WXLogUtils.d(mLodBuilder.substring(0));
+    mLodBuilder.setLength(0);
     // }
     mWXBridge.execJS(instanceId, namespace, function, args);
   }
@@ -1540,16 +1543,16 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       framework = (String) msg.obj;
     }
 
-    if(WXUtils.getAvailMemory(WXEnvironment.getApplication()) > LOW_MEM_VALUE) {
+    if (WXUtils.getAvailMemory(WXEnvironment.getApplication()) > LOW_MEM_VALUE) {
       initFramework(framework);
     }
   }
 
-  private void initFramework(String framework){
+  private void initFramework(String framework) {
     if (!isJSFrameworkInit()) {
       if (TextUtils.isEmpty(framework)) {
         // if (WXEnvironment.isApkDebugable()) {
-          WXLogUtils.d("weex JS framework from assets");
+        WXLogUtils.d("weex JS framework from assets");
         // }
         framework = WXFileUtils.loadAsset("main.js", WXEnvironment.getApplication());
       }
@@ -1564,7 +1567,23 @@ public class WXBridgeManager implements Callback,BactchExecutor {
         }
 
         long start = System.currentTimeMillis();
-        if(mWXBridge.initFramework(framework, assembleDefaultOptions())==INIT_FRAMEWORK_OK){
+        String crashFile = "";
+        try {
+          crashFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath();
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
+        boolean pieSupport = true;
+        try {
+          if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
+            pieSupport = false;
+          }
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
+        WXLogUtils.d("[WXBridgeManager] initFrameworkEnv crashFile:" + crashFile + " pieSupport:" + pieSupport);
+        // extends initFramework
+        if (mWXBridge.initFrameworkEnv(framework, assembleDefaultOptions(), crashFile, pieSupport) == INIT_FRAMEWORK_OK) {
           WXEnvironment.sJSLibInitTime = System.currentTimeMillis() - start;
           WXLogUtils.renderPerformanceLog("initFramework", WXEnvironment.sJSLibInitTime);
           WXEnvironment.sSDKInitTime = System.currentTimeMillis() - WXEnvironment.sSDKInitStart;
@@ -1583,25 +1602,25 @@ public class WXBridgeManager implements Callback,BactchExecutor {
             reinitInfo = "reinit Framework:";
           }
           commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_SUCCESS, reinitInfo + "success");
-        }else{
+        } else {
           if (reInitCount > 1) {
             WXLogUtils.e("[WXBridgeManager] invokeReInitFramework  ExecuteJavaScript fail");
-            String err="[WXBridgeManager] invokeReInitFramework  ExecuteJavaScript fail reinit FrameWork";
+            String err = "[WXBridgeManager] invokeReInitFramework  ExecuteJavaScript fail reinit FrameWork";
             commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_REINIT_FRAMEWORK, err);
           } else {
             WXLogUtils.e("[WXBridgeManager] invokeInitFramework  ExecuteJavaScript fail");
-            String err="[WXBridgeManager] invokeInitFramework  ExecuteJavaScript fail";
+            String err = "[WXBridgeManager] invokeInitFramework  ExecuteJavaScript fail";
             commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_FRAMEWORK, err);
           }
         }
       } catch (Throwable e) {
         if (reInitCount > 1) {
           WXLogUtils.e("[WXBridgeManager] invokeInitFramework ", e);
-          String err="[WXBridgeManager] invokeInitFramework reinit FrameWork exception!#"+e.toString();
+          String err = "[WXBridgeManager] invokeInitFramework reinit FrameWork exception!#" + e.toString();
           commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_REINIT_FRAMEWORK, err);
         } else {
           WXLogUtils.e("[WXBridgeManager] invokeInitFramework ", e);
-          String err="[WXBridgeManager] invokeInitFramework exception!#"+e.toString();
+          String err = "[WXBridgeManager] invokeInitFramework exception!#" + e.toString();
           commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_FRAMEWORK, err);
         }
       }
@@ -1613,7 +1632,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
   private void invokeCallJSBatch(Message message) {
     if (mNextTickTasks.isEmpty() || !isJSFrameworkInit()) {
       if (!isJSFrameworkInit()) {
-        WXLogUtils.e("[WXBridgeManager] invokeCallJSBatch: framework.js uninitialized!!  message:"+message.toString());
+        WXLogUtils.e("[WXBridgeManager] invokeCallJSBatch: framework.js uninitialized!!  message:" + message.toString());
       }
       return;
     }
@@ -1634,16 +1653,16 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       task = ((ArrayList) task).toArray();
 
       WXJSObject[] args = {
-              new WXJSObject(WXJSObject.String, instanceId),
-              new WXJSObject(WXJSObject.JSON,
-                      WXJsonUtils.fromObjectToJSONString(task))};
+          new WXJSObject(WXJSObject.String, instanceId),
+          new WXJSObject(WXJSObject.JSON,
+              WXJsonUtils.fromObjectToJSONString(task))};
 
       invokeExecJS(String.valueOf(instanceId), null, METHOD_CALL_JS, args);
 
     } catch (Throwable e) {
       WXLogUtils.e("WXBridgeManager", e);
-      String err="invokeCallJSBatch#"+e.toString();
-      commitJSBridgeAlarmMonitor(message.obj.toString(), WXErrorCode.WX_ERR_JS_EXECUTE,err);
+      String err = "invokeCallJSBatch#" + e.toString();
+      commitJSBridgeAlarmMonitor(message.obj.toString(), WXErrorCode.WX_ERR_JS_EXECUTE, err);
     }
 
     // If task is not empty, loop until it is empty
@@ -1715,16 +1734,16 @@ public class WXBridgeManager implements Callback,BactchExecutor {
 
   /**
    * Register Android module
+   *
    * @param modules the format is like
    *                {'dom':['updateAttrs','updateStyle'],'event':['openUrl']}
    */
 
   public void registerModules(final Map<String, Object> modules) {
     if (modules != null && modules.size() != 0) {
-      if(isJSThread()){
+      if (isJSThread()) {
         invokeRegisterModules(modules, mRegisterModuleFailList);
-      }
-      else{
+      } else {
         post(new Runnable() {
           @Override
           public void run() {
@@ -1739,7 +1758,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
    * Registered component
    */
   public void registerComponents(final List<Map<String, Object>> components) {
-    if ( mJSHandler == null || components == null
+    if (mJSHandler == null || components == null
         || components.size() == 0) {
       return;
     }
@@ -1770,7 +1789,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       mWXBridge.execJSService(service);
     } catch (Throwable e) {
       WXLogUtils.e("[WXBridgeManager] invokeRegisterService:", e);
-      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK,WXErrorCode.WX_ERR_JS_EXECUTE,"invokeRegisterService");
+      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_EXECUTE, "invokeRegisterService");
     }
   }
 
@@ -1788,38 +1807,38 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     }
 
     WXJSObject[] args = {new WXJSObject(WXJSObject.JSON,
-                                        WXJsonUtils.fromObjectToJSONString(modules))};
+        WXJsonUtils.fromObjectToJSONString(modules))};
     try {
       mWXBridge.execJS("", null, METHOD_REGISTER_MODULES, args);
     } catch (Throwable e) {
       WXLogUtils.e("[WXBridgeManager] invokeRegisterModules:", e);
-      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK,WXErrorCode.WX_ERR_JS_EXECUTE,"invokeRegisterModules");
+      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_EXECUTE, "invokeRegisterModules");
     }
   }
 
   private void invokeRegisterComponents(List<Map<String, Object>> components, List<Map<String, Object>> failReceiver) {
-    if(components == failReceiver){
+    if (components == failReceiver) {
       throw new RuntimeException("Fail receiver should not use source.");
     }
     if (!isJSFrameworkInit()) {
       WXLogUtils.e("[WXBridgeManager] invokeRegisterComponents: framework.js uninitialized.");
 
-      for (Map<String,Object> comp:components){
+      for (Map<String, Object> comp : components) {
         failReceiver.add(comp);
       }
       return;
     }
-    if(components == null){
+    if (components == null) {
       return;
     }
 
     WXJSObject[] args = {new WXJSObject(WXJSObject.JSON,
-                                        WXJsonUtils.fromObjectToJSONString(components))};
+        WXJsonUtils.fromObjectToJSONString(components))};
     try {
       mWXBridge.execJS("", null, METHOD_REGISTER_COMPONENTS, args);
     } catch (Throwable e) {
       WXLogUtils.e("[WXBridgeManager] invokeRegisterComponents ", e);
-      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK,WXErrorCode.WX_ERR_JS_EXECUTE,"invokeRegisterComponents");
+      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_EXECUTE, "invokeRegisterComponents");
     }
   }
 
@@ -1828,7 +1847,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       mJSThread.quit();
     }
     mBridgeManager = null;
-    if(mDestroyedInstanceId!=null){
+    if (mDestroyedInstanceId != null) {
       mDestroyedInstanceId.clear();
     }
 
@@ -1839,105 +1858,98 @@ public class WXBridgeManager implements Callback,BactchExecutor {
    */
   public void reportJSException(String instanceId, String function,
                                 String exception) {
-      WXLogUtils.e("reportJSException >>>> instanceId:" + instanceId
-              + ", exception function:" + function + ", exception:"
-              + exception);
-	  WXSDKInstance instance = null;
-      if (instanceId != null && (instance = WXSDKManager.getInstance().getSDKInstance(instanceId)) != null) {
-          instance.onJSException(WXErrorCode.WX_ERR_JS_EXECUTE.getErrorCode(), function, exception);
-
-          if (METHOD_CREATE_INSTANCE.equals(function)) {
-              try {
-                  if (reInitCount > 1 && !instance.isNeedReLoad()) {
-                      // JSONObject domObject = JSON.parseObject(tasks);
-                      WXDomModule domModule = getDomModule(instanceId);
-                      Action action = Actions.getReloadPage(instanceId, true);
-                      domModule.postAction((DOMAction) action, true);
-                      instance.setNeedLoad(true);
-                      return;
-                  }
-              } catch (Exception e) {
-                  e.printStackTrace();
-              }
+    WXLogUtils.e("reportJSException >>>> instanceId:" + instanceId
+        + ", exception function:" + function + ", exception:"
+        + exception);
+    WXSDKInstance instance = null;
+    if (instanceId != null && (instance = WXSDKManager.getInstance().getSDKInstance(instanceId)) != null) {
+      instance.onJSException(WXErrorCode.WX_ERR_JS_EXECUTE.getErrorCode(), function, exception);
+
+      if (METHOD_CREATE_INSTANCE.equals(function)) {
+        try {
+          if (reInitCount > 1 && !instance.isNeedReLoad()) {
+            // JSONObject domObject = JSON.parseObject(tasks);
+            WXDomModule domModule = getDomModule(instanceId);
+            Action action = Actions.getReloadPage(instanceId, true);
+            domModule.postAction((DOMAction) action, true);
+            instance.setNeedLoad(true);
+            return;
           }
-          String err = "function:" + function + "#exception:" + exception;
-          commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_JS_EXECUTE, err);
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
       }
+      String err = "function:" + function + "#exception:" + exception;
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_JS_EXECUTE, err);
+    }
 
-      IWXJSExceptionAdapter adapter = WXSDKManager.getInstance().getIWXJSExceptionAdapter();
-      if (adapter != null) {
-          String bundleUrl;
-          String exceptionId = instanceId;
+    IWXJSExceptionAdapter adapter = WXSDKManager.getInstance().getIWXJSExceptionAdapter();
+    if (adapter != null) {
+      String bundleUrl;
+      String exceptionId = instanceId;
 
-          if (instanceId == "" || instanceId == null) {
-              exceptionId = "instanceIdisNull";
-          }
+      if (instanceId == "" || instanceId == null) {
+        exceptionId = "instanceIdisNull";
+      }
 
-          if (instance == null) {
-              if (("initFramework").equals(function)) {
-                  bundleUrl = "jsExceptionBeforeRenderInstanceNull";
-                  String exceptionExt = null;
-                  try {
-                      if (WXEnvironment.getApplication() != null) {
-                          final String fileName = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath() + INITLOGFILE;
-                          try {
-                              File file = new File(fileName);
-                              if (file.exists()) {
-                                  if (file.length() > 0) {
-                                      StringBuilder result = new StringBuilder();
-                                      try {
-                                          InputStreamReader read = new InputStreamReader(new FileInputStream(file), "UTF-8");
-                                          BufferedReader br = new BufferedReader(read);
-                                          String s = null;
-                                          while ((s = br.readLine()) != null) {
-                                              result.append(s + "\n");
-                                          }
-                                          exceptionExt = result.toString();
-                                          br.close();
-                                      } catch (Exception e) {
-                                          e.printStackTrace();
-                                      }
-                                  }
-                                  file.delete();
-                              }
-                          } catch (Throwable throwable) {
-
-                          }
+      if (instance == null) {
+        if (("initFramework").equals(function)) {
+          bundleUrl = "jsExceptionBeforeRenderInstanceNull";
+          String exceptionExt = null;
+          try {
+            if (WXEnvironment.getApplication() != null) {
+              final String fileName = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath() + INITLOGFILE;
+              try {
+                File file = new File(fileName);
+                if (file.exists()) {
+                  if (file.length() > 0) {
+                    StringBuilder result = new StringBuilder();
+                    try {
+                      InputStreamReader read = new InputStreamReader(new FileInputStream(file), "UTF-8");
+                      BufferedReader br = new BufferedReader(read);
+                      String s = null;
+                      while ((s = br.readLine()) != null) {
+                        result.append(s + "\n");
                       }
-                  } catch (Throwable e) {
+                      exceptionExt = result.toString();
+                      br.close();
+                    } catch (Exception e) {
                       e.printStackTrace();
+                    }
                   }
-                  exception += "\n" + exceptionExt;
-                  WXLogUtils.e("reportJSException:" + exception);
+                  file.delete();
+                }
+              } catch (Throwable throwable) {
 
-              } else if (function == null) {
-                  bundleUrl = "jsExceptionInstanceAndFunctionNull";
-              } else {
-                  bundleUrl = "jsExceptionInstanceNull" + function;
               }
-          } else {
-              bundleUrl = instance.getBundleUrl();
+            }
+          } catch (Throwable e) {
+            e.printStackTrace();
           }
+          exception += "\n" + exceptionExt;
+          WXLogUtils.e("reportJSException:" + exception);
 
-          WXJSExceptionInfo jsException = new WXJSExceptionInfo(exceptionId, bundleUrl, WXErrorCode.WX_ERR_JS_EXECUTE.getErrorCode(), function, exception, null);
-          adapter.onJSException(jsException);
-          if (WXEnvironment.isApkDebugable()) {
-              WXLogUtils.d(jsException.toString());
-          }
+        } else if (function == null) {
+          bundleUrl = "jsExceptionInstanceAndFunctionNull";
+        } else {
+          bundleUrl = "jsExceptionInstanceNull" + function;
+        }
+      } else {
+        bundleUrl = instance.getBundleUrl();
       }
-  }
-
-  public static class TimerInfo {
 
-    public String callbackId;
-    public long time;
-    public String instanceId;
+      WXJSExceptionInfo jsException = new WXJSExceptionInfo(exceptionId, bundleUrl, WXErrorCode.WX_ERR_JS_EXECUTE.getErrorCode(), function, exception, null);
+      adapter.onJSException(jsException);
+      if (WXEnvironment.isApkDebugable()) {
+        WXLogUtils.d(jsException.toString());
+      }
+    }
   }
 
   private void registerDomModule() throws WXException {
     /** Tell Javascript Framework what methods you have. This is Required.**/
-    Map<String,Object> domMap=new HashMap<>();
-    domMap.put(WXDomModule.WXDOM,WXDomModule.METHODS);
+    Map<String, Object> domMap = new HashMap<>();
+    domMap.put(WXDomModule.WXDOM, WXDomModule.METHODS);
     registerModules(domMap);
   }
 
@@ -1963,7 +1975,7 @@ public class WXBridgeManager implements Callback,BactchExecutor {
       public void run() {
         if (!isJSFrameworkInit())
           return;
-        
+
         invokeExecJS("", null, METHOD_NOTIFY_SERIALIZE_CODE_CACHE, new WXJSObject[0]);
       }
     });
@@ -1977,4 +1989,11 @@ public class WXBridgeManager implements Callback,BactchExecutor {
     msg.sendToTarget();
   }
 
+  public static class TimerInfo {
+
+    public String callbackId;
+    public long time;
+    public String instanceId;
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index 94ac1e0..842229e 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -183,6 +183,9 @@ public class Constants {
     String ARIA_LABEL = "ariaLabel";
     String ARIA_HIDDEN = "ariaHidden";
 
+    String STICKY_OFFSET = "stickyOffset";
+    String HAS_FIXED_SIZE = "hasFixedSize";
+    String KEEP_POSITION_LAYOUT_DELAY = "keepPositionLayoutDelay";
 
     interface  Recycler{
       String LIST_DATA = "listData";

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java b/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
index 9d4885c..92b1585 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
@@ -38,6 +38,15 @@ public interface IWXBridge extends IWXObject {
    */
   int initFramework(String framework, WXParams params);
 
+
+  /**
+   * init Weex
+   *
+   * @param framework assets/main.js
+   * @return
+   */
+  int initFrameworkEnv(String framework, WXParams params, String cacheDir, boolean pieSupport);
+
   /**
    * execute javascript function
    */



[11/18] incubator-weex git commit: Revert: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
index 03f3057..782b16c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
@@ -335,7 +335,9 @@ public class WXDomObject extends CSSNode implements Cloneable,ImmutableDomObject
 
     int index = mDomChildren.indexOf(child);
     if (index == -1) {
+      if (WXEnvironment.isApkDebugable()) {
         WXLogUtils.e("[WXDomObject] remove function error");
+      }
       return;
     }
     mDomChildren.remove(index).parent = null;
@@ -683,7 +685,7 @@ public class WXDomObject extends CSSNode implements Cloneable,ImmutableDomObject
             type = TextUtils.isEmpty(result.replacedComponent) ? WXBasicComponentType.DIV
                     : result.replacedComponent;
             json.put(TYPE, type);
-            if (result.validateInfo != null) {
+            if (WXEnvironment.isApkDebugable() && result.validateInfo != null) {
               String tag = "[WXDomObject]onComponentValidate failure. >>> " + result.validateInfo.toJSONString();
               WXLogUtils.e(tag);
             }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java b/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java
index 3fcedcb..9f35263 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java
@@ -96,7 +96,9 @@ public abstract class AbstractAddElementAction extends TraceableAction implement
     Stopwatch.split("parseDomObject");
 
     if (domObject == null || context.getDomByRef(domObject.getRef()) != null) {
-      WXLogUtils.e("[DOMActionContextImpl] " + getStatementName() + " error,DOM object is null or already registered!!");
+      if (WXEnvironment.isApkDebugable()) {
+        WXLogUtils.e("[DOMActionContextImpl] " + getStatementName() + " error,DOM object is null or already registered!!");
+      }
       instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, errCode);
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java b/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java
index bbd093c..258da68 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java
@@ -91,8 +91,5 @@ final class MoveElementAction implements DOMAction, RenderAction {
     WXVContainer oldParent = component.getParent();
     oldParent.remove(component,false);
     ((WXVContainer) newParent).addChild(component, mNewIndex);
-    if(!component.isVirtualComponent()){
-      ((WXVContainer) newParent).addSubView(component.getHostView(), mNewIndex);
-    }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
index 4ca9d50..a8d1963 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
@@ -221,14 +221,6 @@ public abstract class AbstractEditComponent extends WXComponent<WXEditText> {
 
           mBeforeText = s.toString();
 
-          if (getDomObject() != null && getDomObject().getAttrs() != null) {
-            Object val = getDomObject().getAttrs().get(Constants.Name.VALUE);
-            String valString = WXUtils.getString(val, null);
-            if (mBeforeText != null && mBeforeText.equals(valString)) {
-              return;
-            }
-          }
-
           if (!mIgnoreNextOnInputEvent) {
             fireEvent(Constants.Event.INPUT, s.toString());
           }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 082c14e..bd6c2d7 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -999,9 +999,7 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
    * @param type
    */
   public void addEvent(String type) {
-    if (TextUtils.isEmpty(type)
-            || mAppendEvents.contains(type)
-            || getRealView() == null) {
+    if (TextUtils.isEmpty(type) || mAppendEvents.contains(type)) {
       return;
     }
     mAppendEvents.add(type);

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java
index 4f9712f..4323821 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java
@@ -59,9 +59,11 @@ public class WXComponentFactory {
 
     IFComponentHolder holder = WXComponentRegistry.getComponent(node.getType());
     if (holder == null) {
+      if (WXEnvironment.isApkDebugable()) {
         String tag = "WXComponentFactory error type:[" +
                 node.getType() + "]" + " class not found";
         WXLogUtils.e(tag);
+      }
       //For compatible reason of JS framework, unregistered type will be treated as container.
       holder = WXComponentRegistry.getComponent(WXBasicComponentType.CONTAINER);
       if(holder == null){

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
index 1c4d062..1cf5d02 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
@@ -19,7 +19,6 @@
 package com.taobao.weex.ui.component;
 
 import android.Manifest;
-import android.app.Activity;
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.graphics.RectF;
@@ -28,7 +27,6 @@ import android.net.Uri;
 import android.os.Build;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
-import android.support.v4.app.ActivityCompat;
 import android.support.v4.content.ContextCompat;
 import android.text.TextUtils;
 import android.widget.ImageView;
@@ -73,7 +71,6 @@ public class WXImage extends WXComponent<ImageView> {
 
   public static final String SUCCEED = "success";
   public static final String ERRORDESC = "errorDesc";
-  private static final int WRITE_EXTERNAL_STORAGE_PERMISSION_REQUEST_CODE = 0x2;
 
   private String mSrc;
   private int mBlurRadius;
@@ -359,13 +356,6 @@ public class WXImage extends WXComponent<ImageView> {
   public void save(final JSCallback saveStatuCallback) {
 
     if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
-      if (getContext() instanceof Activity) {
-        ActivityCompat.requestPermissions((Activity) getContext(),
-                new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_PERMISSION_REQUEST_CODE);
-      }
-    }
-
-    if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
       if (saveStatuCallback != null) {
         Map<String, Object> result = new HashMap<>();
         result.put(SUCCEED, false);

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
index 9e56259..6cf784f 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
@@ -233,7 +233,7 @@ public class WXScroller extends WXVContainer<ViewGroup> implements WXScrollViewL
    * Intercept refresh view and loading view
    */
   @Override
-  public void addSubView(View child, int index) {
+  protected void addSubView(View child, int index) {
     if (child == null || getRealView() == null) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
index ec2d73f..1023e3e 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
@@ -173,7 +173,7 @@ public class WXSlider extends WXVContainer<FrameLayout> {
   }
 
   @Override
-  public void addSubView(View view, int index) {
+  protected void addSubView(View view, int index) {
     if (view == null || mAdapter == null) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java
index 0899c8d..b1001b7 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java
@@ -113,7 +113,7 @@ public class WXSliderNeighbor extends WXSlider {
     }
 
     @Override
-    public void addSubView(View view, final int index) {
+    protected void addSubView(View view, final int index) {
         if (view == null || mAdapter == null) {
             return;
         }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
index 62b667b..e9263eb 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
@@ -20,9 +20,6 @@ package com.taobao.weex.ui.component;
 
 import android.content.Context;
 import android.content.Intent;
-import android.support.annotation.RestrictTo;
-import android.support.annotation.RestrictTo.Scope;
-import android.util.Pair;
 import android.support.annotation.Nullable;
 import android.util.Pair;
 import android.view.Menu;
@@ -312,8 +309,7 @@ public abstract class WXVContainer<T extends ViewGroup> extends WXComponent<T> {
     }
   }
 
-  @RestrictTo(Scope.LIBRARY)
-  public void addSubView(View child, int index) {
+  protected void addSubView(View child, int index) {
     if (child == null || getRealView() == null) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
index c04ed0a..640a17e 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
@@ -150,15 +150,6 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
   private WXStickyHelper stickyHelper;
 
 
-
-  /**
-   * keep positon
-   * */
-  private  WXComponent keepPositionCell = null;
-  private  Runnable keepPositionCellRunnable = null;
-  private  long keepPositionLayoutDelay = 150;
-
-
   public BasicListComponent(WXSDKInstance instance, WXDomObject node, WXVContainer parent) {
     super(instance, node, parent);
     stickyHelper = new WXStickyHelper(this);
@@ -245,9 +236,6 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
     if (transforms != null) {
       bounceRecyclerView.getInnerView().addItemDecoration(RecyclerTransform.parseTransforms(getOrientation(), transforms));
     }
-    if(getDomObject().getAttrs().get(Constants.Name.KEEP_POSITION_LAYOUT_DELAY) != null){
-      keepPositionLayoutDelay = WXUtils.getNumberInt(getDomObject().getAttrs().get(Constants.Name.KEEP_POSITION_LAYOUT_DELAY), (int)keepPositionLayoutDelay);
-    }
 
     mItemAnimator=bounceRecyclerView.getInnerView().getItemAnimator();
 
@@ -257,10 +245,6 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
     bounceRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
     bounceRecyclerView.getInnerView().clearOnScrollListeners();
     bounceRecyclerView.getInnerView().addOnScrollListener(mViewOnScrollListener);
-    if(getDomObject().getAttrs().get(Constants.Name.HAS_FIXED_SIZE) != null){
-      boolean hasFixedSize = WXUtils.getBoolean(getDomObject().getAttrs().get(Constants.Name.HAS_FIXED_SIZE), false);
-      bounceRecyclerView.getInnerView().setHasFixedSize(hasFixedSize);
-    }
     bounceRecyclerView.getInnerView().addOnScrollListener(new RecyclerView.OnScrollListener() {
       @Override
       public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
@@ -501,54 +485,53 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
       if (stickyComponent != null && stickyComponent.getDomObject() != null
           && stickyComponent instanceof WXCell) {
 
-          WXCell cell = (WXCell) stickyComponent;
-          if (cell.getHostView() == null) {
-            return;
-          }
-
-          int[] location = new int[2];
-          stickyComponent.getHostView().getLocationOnScreen(location);
-          int[] parentLocation = new int[2];
-          stickyComponent.getParentScroller().getView().getLocationOnScreen(parentLocation);
-          int top = location[1] - parentLocation[1];
-
+        WXCell cell = (WXCell) stickyComponent;
+        if (cell.getHostView() == null) {
+          return;
+        }
 
           RecyclerView.LayoutManager layoutManager;
           boolean beforeFirstVisibleItem = false;
           boolean removeOldSticky = false;
           layoutManager = getHostView().getInnerView().getLayoutManager();
           if (layoutManager instanceof LinearLayoutManager || layoutManager instanceof GridLayoutManager) {
-            int firstVisiblePosition = ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition();
-            int lastVisiblePosition = ((LinearLayoutManager) layoutManager).findLastVisibleItemPosition();
+            int fVisible = ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition();
             int pos = mChildren.indexOf(cell);
             cell.setScrollPositon(pos);
-            if (pos <= firstVisiblePosition
-                    || (cell.getStickyOffset() > 0 && firstVisiblePosition < pos && pos <= lastVisiblePosition  &&
-                    top <= cell.getStickyOffset())) {
+
+            if (pos <= fVisible) {
               beforeFirstVisibleItem = true;
               if(pos > currentStickyPos) {
                 currentStickyPos = pos;
               }
-            }else{
+            }
+
+            if(pos > fVisible){
               removeOldSticky = true;
             }
           } else if(layoutManager instanceof StaggeredGridLayoutManager){
             int [] firstItems= new int[3];
-            int firstVisiblePosition = ((StaggeredGridLayoutManager) layoutManager).findFirstVisibleItemPositions(firstItems)[0];
-            int lastVisiblePosition = ((StaggeredGridLayoutManager)  layoutManager).findLastVisibleItemPositions(firstItems)[0];
+            int fVisible = ((StaggeredGridLayoutManager) layoutManager).findFirstVisibleItemPositions(firstItems)[0];
             int pos = mChildren.indexOf(cell);
 
-            if (pos <= firstVisiblePosition || (cell.getStickyOffset() > 0 && firstVisiblePosition < pos && pos <= lastVisiblePosition  &&
-                    top <= cell.getStickyOffset())) {
+            if (pos <= fVisible) {
               beforeFirstVisibleItem = true;
-            }else{
+            }
+
+            if(pos > fVisible){
               removeOldSticky = true;
             }
           }
 
+          int[] location = new int[2];
+          stickyComponent.getHostView().getLocationOnScreen(location);
+          int[] parentLocation = new int[2];
+          stickyComponent.getParentScroller().getView().getLocationOnScreen(parentLocation);
+
+          int top = location[1] - parentLocation[1];
 
-          boolean showSticky = beforeFirstVisibleItem && cell.getLocationFromStart() >= 0 && top <= cell.getStickyOffset() && dy >= 0;
-          boolean removeSticky = cell.getLocationFromStart() <= cell.getStickyOffset() && top > cell.getStickyOffset() && dy <= 0;
+          boolean showSticky = beforeFirstVisibleItem && cell.getLocationFromStart() >= 0 && top <= 0 && dy >= 0;
+          boolean removeSticky = cell.getLocationFromStart() <= 0 && top > 0 && dy <= 0;
           if (showSticky) {
             bounceRecyclerView.notifyStickyShow(cell);
           } else if (removeSticky || removeOldSticky) {
@@ -601,6 +584,7 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
   @Override
   public void addChild(WXComponent child, int index) {
     super.addChild(child, index);
+
     if (child == null || index < -1) {
       return;
     }
@@ -609,7 +593,7 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
     bindViewType(child);
 
     int adapterPosition = index == -1 ? mChildren.size() - 1 : index;
-    final T view = getHostView();
+    T view = getHostView();
     if (view != null) {
       boolean isAddAnimation = false;
       ImmutableDomObject domObject = child.getDomObject();
@@ -632,52 +616,9 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
         }
       }
       if (isKeepScrollPosition) {
-        if(view.getInnerView().getLayoutManager() instanceof  LinearLayoutManager){
-            if(!view.getInnerView().isLayoutFrozen()){ //frozen, prevent layout when scroll
-                view.getInnerView().setLayoutFrozen(true);
-            }
-            if(keepPositionCell == null){
-              int last=((LinearLayoutManager)view.getInnerView().getLayoutManager()).findLastCompletelyVisibleItemPosition();
-              ListBaseViewHolder holder = (ListBaseViewHolder) view.getInnerView().findViewHolderForAdapterPosition(last);
-              if(holder != null){
-                 keepPositionCell = holder.getComponent();
-              }
-              if(keepPositionCell != null) {
-                if(keepPositionCellRunnable != null){
-                  view.removeCallbacks(keepPositionCellRunnable);
-                }
-                keepPositionCellRunnable = new Runnable() {
-                  @Override
-                  public void run() {
-                    if(keepPositionCell != null){
-                      int keepPosition = indexOf(keepPositionCell);
-                      int offset = 0;
-                      if(keepPositionCell.getHostView() != null){
-                        offset = keepPositionCell.getHostView().getTop();
-                      }
-                      if(offset > 0) {
-                        ((LinearLayoutManager) view.getInnerView().getLayoutManager()).scrollToPositionWithOffset(keepPosition, offset);
-                      }else{
-                        view.getInnerView().getLayoutManager().scrollToPosition(keepPosition);
-
-                      }
-                      view.getInnerView().setLayoutFrozen(false);
-                      keepPositionCell = null;
-                      keepPositionCellRunnable = null;
-                    }
-                  }
-                };
-              }
-            }
-            if(keepPositionCellRunnable == null){
-               view.getInnerView().scrollToPosition(((LinearLayoutManager)view.getInnerView().getLayoutManager()).findLastVisibleItemPosition());
-            }
-        }
+        int last=((LinearLayoutManager)view.getInnerView().getLayoutManager()).findLastVisibleItemPosition();
+        view.getInnerView().getLayoutManager().scrollToPosition(last);
         view.getRecyclerViewBaseAdapter().notifyItemInserted(adapterPosition);
-        if(keepPositionCellRunnable != null){
-          view.removeCallbacks(keepPositionCellRunnable);
-          view.postDelayed(keepPositionCellRunnable, keepPositionLayoutDelay);
-        }
       } else {
         view.getRecyclerViewBaseAdapter().notifyItemChanged(adapterPosition);
       }
@@ -687,7 +628,6 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
 
 
 
-
   private void relocateAppearanceHelper() {
     Iterator<Map.Entry<String, AppearanceHelper>> iterator = mAppearComponents.entrySet().iterator();
     while (iterator.hasNext()) {
@@ -706,7 +646,7 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
    * com.taobao.weex.ui.view.listview.WXRecyclerView}
    */
   @Override
-  public void addSubView(View child, int index) {
+  protected void addSubView(View child, int index) {
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java
index cedd86c..1534013 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java
@@ -21,7 +21,6 @@ package com.taobao.weex.ui.component.list;
 import android.view.View;
 import android.view.ViewGroup;
 
-import com.taobao.weex.WXEnvironment;
 import com.taobao.weex.common.WXThread;
 import com.taobao.weex.utils.WXLogUtils;
 
@@ -88,20 +87,12 @@ public class StickyHeaderHelper {
         if ((existedParent = (ViewGroup) headerView.getParent()) != null) {
           existedParent.removeView(headerView);
         }
-        headerView.setTag(headComponent.getRef());
         mParent.addView(headerView);
-        headerView.setTag(this);
-        if(headComponent.getStickyOffset() > 0) {
-          ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) headerView.getLayoutParams();
-          if(headComponent.getStickyOffset() != params.topMargin) {
-            params.topMargin = headComponent.getStickyOffset();
-          }
-        }
         //recover translation, sometimes it will be changed on fling
         headerView.setTranslationX(translationX);
         headerView.setTranslationY(translationY);
+
       }
-      changeFrontStickyVisible();
       if (headComponent.getDomObject().getEvents().contains("sticky")) {
         headComponent.fireEvent("sticky");
       }
@@ -117,8 +108,7 @@ public class StickyHeaderHelper {
 
 
     if(component == null || headerView == null){
-      if(WXEnvironment.isApkDebugable()) {
-      }
+      WXLogUtils.e(" sticky header to remove not found."+compToRemove.getRef());
       return;
     }
     if(mCurrentStickyRef != null && mCurrentStickyRef.equals(compToRemove.getRef())){
@@ -128,12 +118,7 @@ public class StickyHeaderHelper {
       @Override
       public void run() {
         mParent.removeView(headerView);
-        if(headerView.getVisibility() != View.VISIBLE){
-           headerView.setVisibility(View.VISIBLE);
-        }
         component.recoverySticky();
-        changeFrontStickyVisible();
-
       }
     }));
     if (component.getDomObject().getEvents().contains("unsticky")) {
@@ -156,7 +141,6 @@ public class StickyHeaderHelper {
         View view = mHeaderViews.get(cell.getRef());
         if(view != null){
           view.bringToFront();
-          changeFrontStickyVisible();
         }
       }
     }
@@ -164,27 +148,4 @@ public class StickyHeaderHelper {
       notifyStickyRemove(cell);
     }
   }
-
-
-  private void changeFrontStickyVisible(){
-    if(mHeaderViews.size() <= 0){
-      return;
-    }
-    boolean  fontVisible = false;
-    for(int i=mParent.getChildCount()-1; i>=0; i--){
-         View view = mParent.getChildAt(i);
-         if(fontVisible && view.getTag() instanceof  StickyHeaderHelper){
-             if(view.getVisibility() != View.GONE){
-                  view.setVisibility(View.GONE);
-             }
-         }else{
-           if(view.getTag() instanceof  StickyHeaderHelper){
-               fontVisible = true;
-               if(view != null && view.getVisibility() != View.VISIBLE){
-                   view.setVisibility(View.VISIBLE);
-               }
-           }
-         }
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
index 925da65..4fe4bc2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
@@ -37,9 +37,6 @@ import com.taobao.weex.ui.flat.WidgetContainer;
 import com.taobao.weex.ui.view.WXFrameLayout;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
-import com.taobao.weex.utils.WXViewUtils;
-
-import static com.taobao.weex.common.Constants.Name.STICKY_OFFSET;
 
 /**
  * Root component for components in {@link WXListComponent}
@@ -58,14 +55,12 @@ public class WXCell extends WidgetContainer<WXFrameLayout> {
     private int mScrollPositon = -1;
     private boolean mFlatUIEnabled = false;
 
-
     private Object  renderData;
 
     private boolean isSourceUsed = false;
 
     private boolean hasLayout = false;
 
-
     @Deprecated
     public WXCell(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy) {
         super(instance, dom, parent);
@@ -147,41 +142,28 @@ public class WXCell extends WidgetContainer<WXFrameLayout> {
     }
 
     public void removeSticky() {
-        if(getHostView().getChildCount() > 0) {
-            mHeadView = getHostView().getChildAt(0);
-            int[] location = new int[2];
-            int[] parentLocation = new int[2];
-            getHostView().getLocationOnScreen(location);
-            getParentScroller().getView().getLocationOnScreen(parentLocation);
-            int headerViewOffsetX = location[0] - parentLocation[0];
-            int headerViewOffsetY = getParent().getHostView().getTop();
-            getHostView().removeView(mHeadView);
-            mRealView = (ViewGroup) mHeadView;
-            mTempStickyView = new FrameLayout(getContext());
-            FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams((int) getDomObject().getLayoutWidth(),
-                    (int) getDomObject().getLayoutHeight());
-            getHostView().addView(mTempStickyView, lp);
-            mHeadView.setTranslationX(headerViewOffsetX);
-            mHeadView.setTranslationY(headerViewOffsetY);
-        }
+        mHeadView = getHostView().getChildAt(0);
+        int[] location = new int[2];
+        int[] parentLocation = new int[2];
+        getHostView().getLocationOnScreen(location);
+        getParentScroller().getView().getLocationOnScreen(parentLocation);
+        int headerViewOffsetX = location[0] - parentLocation[0];
+        int headerViewOffsetY = getParent().getHostView().getTop();
+        getHostView().removeView(mHeadView);
+        mRealView = (ViewGroup) mHeadView;
+        mTempStickyView = new FrameLayout(getContext());
+        FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams((int) getDomObject().getLayoutWidth(),
+                (int) getDomObject().getLayoutHeight());
+        getHostView().addView(mTempStickyView, lp);
+        mHeadView.setTranslationX(headerViewOffsetX);
+        mHeadView.setTranslationY(headerViewOffsetY);
     }
 
     public void recoverySticky() {
-        if(mHeadView != null){
-            if(mHeadView.getLayoutParams() != null){
-                ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mHeadView.getLayoutParams();
-                if(params.topMargin > 0){
-                    params.topMargin = 0;
-                }
-            }
-            if(mHeadView.getVisibility() != View.VISIBLE){
-                mHeadView.setVisibility(View.VISIBLE);
-            }
-            getHostView().removeView(mTempStickyView);
-            getHostView().addView(mHeadView);
-            mHeadView.setTranslationX(0);
-            mHeadView.setTranslationY(0);
-        }
+        getHostView().removeView(mTempStickyView);
+        getHostView().addView(mHeadView);
+        mHeadView.setTranslationX(0);
+        mHeadView.setTranslationY(0);
     }
 
     @Override
@@ -203,18 +185,6 @@ public class WXCell extends WidgetContainer<WXFrameLayout> {
         return getInstance().getFlatUIContext().isFlatUIEnabled(this) && WXCell.class.equals(getClass()) && !isSticky();
     }
 
-    public int getStickyOffset(){
-        if(getDomObject() == null){
-            return  0;
-        }
-        WXDomObject domObject = (WXDomObject) getDomObject();
-        if(domObject.getAttrs().get(STICKY_OFFSET) == null){
-            return 0;
-        }
-        float  offset = WXUtils.getFloat(domObject.getAttrs().get(STICKY_OFFSET));
-        return (int)(WXViewUtils.getRealPxByWidth(offset,domObject.getViewPortWidth()));
-    }
-
     public Object getRenderData() {
         return renderData;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
index 76bcce0..7e0746b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
@@ -593,7 +593,7 @@ public class WXRecyclerTemplateList extends WXVContainer<BounceRecyclerView> imp
      * com.taobao.weex.ui.view.listview.WXRecyclerView}
      */
     @Override
-    public void addSubView(View child, int index) {
+    protected void addSubView(View child, int index) {
 
     }
 
@@ -1306,7 +1306,7 @@ public class WXRecyclerTemplateList extends WXVContainer<BounceRecyclerView> imp
                     continue;
                 }
                 TemplateViewHolder itemHolder = (TemplateViewHolder) recyclerView.findViewHolderForAdapterPosition(position);
-                if(itemHolder == null || itemHolder.getComponent() == null){
+                if(itemHolder == null){
                     break;
                 }
                 List<WXComponent> childListeners = findChildListByRef(itemHolder.getComponent(), helper.getAwareChild().getRef());

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java
index b2a1793..20be140 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java
@@ -42,8 +42,6 @@ public class WXRecyclerView extends RecyclerView implements WXGestureObservable
   public static final int TYPE_STAGGERED_GRID_LAYOUT = 3;
   private WXGesture mGesture;
   private boolean scrollable = true;
-  private boolean hasTouch = false;
-
 
   public WXRecyclerView(Context context) {
     super(context);
@@ -93,7 +91,6 @@ public class WXRecyclerView extends RecyclerView implements WXGestureObservable
     if(!scrollable) {
       return true;
     }
-    hasTouch = true;
     boolean result = super.onTouchEvent(event);
     if (mGesture != null) {
       result |= mGesture.onTouch(this, event);
@@ -113,31 +110,26 @@ public class WXRecyclerView extends RecyclerView implements WXGestureObservable
       }
       //Any else?
     } else {
-      smoothScrollToPosition(position);
       if (offset != 0) {
         setOnSmoothScrollEndListener(new ExtendedLinearLayoutManager.OnSmoothScrollEndListener() {
           @Override
           public void onStop() {
-            post(new Runnable() {
-              @Override
-              public void run() {
-                if (orientation == Constants.Orientation.VERTICAL) {
-                  smoothScrollBy(0, offset);
-                } else {
-                  smoothScrollBy(offset, 0);
-                }
-              }
-            });
+            if (orientation == Constants.Orientation.VERTICAL) {
+                smoothScrollBy(0, offset);
+            } else {
+                smoothScrollBy(offset, 0);
+            }
           }
         });
       }
+      smoothScrollToPosition(position);
     }
   }
 
   public void setOnSmoothScrollEndListener(final ExtendedLinearLayoutManager.OnSmoothScrollEndListener onSmoothScrollEndListener){
-    if(getLayoutManager() instanceof ExtendedLinearLayoutManager && !hasTouch){
+    if(getLayoutManager() instanceof ExtendedLinearLayoutManager){
        ExtendedLinearLayoutManager extendedLinearLayoutManager = (ExtendedLinearLayoutManager)getLayoutManager();
-      extendedLinearLayoutManager.setOnScrollEndListener(onSmoothScrollEndListener);
+       extendedLinearLayoutManager.setOnScrollEndListener(onSmoothScrollEndListener);
     }else{
       addOnScrollListener(new RecyclerView.OnScrollListener() {
         @Override

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
index 1f5b4b2..1f2b4b1 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
@@ -71,18 +71,13 @@ public class WXLogUtils {
   }
 
   private static void log(String tag, String msg, LogLevel level){
-    if (msg != null && WXEnvironment.sLogLevel.compare(level) >= 0) {
-      if (sLogWatcher != null ) {
-        sLogWatcher.onLog(level.getName(), tag, msg);
-      }else{
-        Log.println(level.getPriority(),tag, msg);
-      }
-
-      // if not debug level then print log
-      if(WXEnvironment.isApkDebugable() && !level.getName().equals("debug")){
-		writeConsoleLog(level.getName(), msg);
-		sendLog(level, msg);
-	  }
+    if (WXEnvironment.isApkDebugable() && msg != null && WXEnvironment.sLogLevel.compare(level) >= 0) {
+      Log.println(level.getPriority(),tag, msg);
+      writeConsoleLog(level.getName(), msg);
+      sendLog(level, msg);
+    }
+    if (sLogWatcher != null) {
+      sLogWatcher.onLog(level.getName(), tag, msg);
     }
   }
 
@@ -119,8 +114,13 @@ public class WXLogUtils {
   }
 
   public static void d(String tag, String msg) {
+    if (!TextUtils.isEmpty(msg) && !TextUtils.isEmpty(tag)) {
+      log(tag, msg, LogLevel.DEBUG);
+    }
 
     if (WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg) && WXEnvironment.sLogLevel.compare(LogLevel.DEBUG) >= 0) {
+      Log.d(tag, msg);
+
       if ("jsLog".equals(tag) && jsLogWatcher != null) {
         if (msg.endsWith("__DEBUG")) {
           jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__DEBUG", ""));
@@ -214,13 +214,15 @@ public class WXLogUtils {
   }
 
   public static void w(String prefix, Throwable e) {
+    if (WXEnvironment.isApkDebugable()) {
       w(prefix + getStackTrace(e));
-
+    }
   }
 
   public static void e(String prefix, Throwable e) {
+    if (WXEnvironment.isApkDebugable()) {
       e(prefix + getStackTrace(e));
-
+    }
   }
 
   public static void wtf(String prefix, Throwable e){

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
index 827cc94..a7fba8a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
@@ -32,7 +32,6 @@ import com.taobao.weex.common.WXErrorCode;
 import com.taobao.weex.common.WXPerformance;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -69,8 +68,6 @@ public class WXSoInstallMgrSdk {
   private final static String ARMEABI = "armeabi"; //default
   private final static String X86 = "x86";
   private final static String MIPS = "mips";
-  private final static String STARTUPSO = "/libweexjsb.so";
-  private final static String STARTUPSOANDROID15 = "/libweexjst.so";
 
   private final static int ARMEABI_Size = 3583820;
   private final static int X86_Size = 4340864;
@@ -114,9 +111,6 @@ public class WXSoInstallMgrSdk {
       return false;
     }
 
-    // copy startup so
-    copyStartUpSo();
-
     boolean InitSuc = false;
     if (checkSoIsValid(libName, BuildConfig.ARMEABI_Size) ||checkSoIsValid(libName, BuildConfig.X86_Size)) {
 
@@ -176,69 +170,6 @@ public class WXSoInstallMgrSdk {
     return InitSuc;
   }
 
-  /**
-   * copyStartUpSo
-   */
-  public static void copyStartUpSo() {
-    try {
-      boolean installOnSdcard = true;
-      String pkgName = WXEnvironment.getApplication().getPackageName();
-      // cp weexjsb any way
-//      try {
-//        PackageManager pm = WXEnvironment.getApplication().getApplicationContext().getPackageManager();
-//        ApplicationInfo appInfo = pm.getApplicationInfo(pkgName, 0);
-//        if ((appInfo.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0) {
-//          // App on sdcard
-//          installOnSdcard = true;
-//        }
-//      } catch (Throwable e) {
-//      }
-
-      if (installOnSdcard) {
-
-        String cacheFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath();
-        // if android api < 16 copy libweexjst.so else copy libweexjsb.so
-        boolean pieSupport = true;
-        File newfile;
-        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
-          pieSupport = false;
-          newfile = new File(cacheFile + STARTUPSOANDROID15);
-        } else {
-          newfile = new File(cacheFile + STARTUPSO);
-        }
-        if (newfile.exists()) {
-          return;
-        }
-
-        String path = "/data/data/" + pkgName + "/lib";
-        if (cacheFile != null && cacheFile.indexOf("/cache") > 0) {
-          path = cacheFile.replace("/cache", "/lib");
-        }
-
-        String soName;
-        if (pieSupport) {
-          soName = path + STARTUPSO;
-        } else {
-          soName = path + STARTUPSOANDROID15;
-        }
-
-        File oldfile = new File(soName);
-        if (oldfile.exists()) {
-          FileInputStream inputStream = new FileInputStream(oldfile);
-          byte[] data = new byte[1024];
-          FileOutputStream outputStream =new FileOutputStream(newfile);
-          while (inputStream.read(data) != -1) {
-            outputStream.write(data);
-          }
-          inputStream.close();
-          outputStream.close();
-        }
-      }
-    } catch (Throwable e) {
-      e.printStackTrace();
-    }
-  }
-
   private static String _getFieldReflectively(Build build, String fieldName) {
     try {
       final Field field = Build.class.getField(fieldName);

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
index 4a1b304..7d11d5a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
@@ -378,7 +378,7 @@ public class WXViewUtils {
   public static void clipCanvasWithinBorderBox(View targetView, Canvas canvas) {
     Drawable drawable;
     if (clipCanvasDueToAndroidVersion(canvas) &&
-        clipCanvasIfAnimationExist(targetView) &&
+        clipCanvasIfAnimationExist() &&
         ((drawable = targetView.getBackground()) instanceof BorderDrawable)) {
       BorderDrawable borderDrawable = (BorderDrawable) drawable;
       if (borderDrawable.isRounded()) {
@@ -394,7 +394,7 @@ public class WXViewUtils {
   public static void clipCanvasWithinBorderBox(Widget widget, Canvas canvas) {
     BorderDrawable borderDrawable;
     if (clipCanvasDueToAndroidVersion(canvas) &&
-        clipCanvasIfAnimationExist(null) &&
+        clipCanvasIfAnimationExist() &&
         (borderDrawable=widget.getBackgroundAndBorder())!=null ) {
       if (borderDrawable.isRounded() && clipCanvasIfBackgroundImageExist(widget, borderDrawable)) {
           Path path = borderDrawable.getContentPath(
@@ -424,25 +424,8 @@ public class WXViewUtils {
    * As animation will not cause redraw if hardware-acceleration enabled, clipCanvas feature has
    * to be disabled when API level is 24 without considering the animation property.
    */
-  private static boolean clipCanvasIfAnimationExist(View targetView) {
-    if (Build.VERSION.SDK_INT != VERSION_CODES.N) {
-      return true;
-    }
-    if(targetView != null &&
-            targetView.getScaleX() == 1 &&
-            targetView.getScaleY() == 1 &&
-            targetView.getTranslationX() == 0 &&
-            targetView.getTranslationY() == 0 &&
-            targetView.getRotation() == 0 &&
-            targetView.getRotationX() == 0 &&
-            targetView.getRotationY() == 0) {
-      if(Build.VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP && targetView.getTranslationZ() != 0 ) {
-        return false;
-      } else {
-        return true;
-      }
-    }
-    return false;
+  private static boolean clipCanvasIfAnimationExist() {
+    return Build.VERSION.SDK_INT != VERSION_CODES.N;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java b/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java
index e249c1c..3fde10a 100644
--- a/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java
@@ -20,7 +20,6 @@ package com.taobao.weex.utils;
 
 import com.taobao.weappplus_sdk.BuildConfig;
 import com.taobao.weex.WXEnvironment;
-
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -92,17 +91,4 @@ public class WXLogUtilsTest {
     Log.e("tag",new Throwable("test"));
   }
 
-  @Test
-  public void testLogLevel() throws Exception {
-    WXEnvironment.sLogLevel = LogLevel.DEBUG;
-    Log.d("LogLevel.DEBUG", "test debug");
-    Log.w("LogLevel.DEBUG", "test warning");
-    Log.e("LogLevel.DEBUG", "test error");
-
-    WXEnvironment.sLogLevel = LogLevel.WARN;
-
-    Log.d("LogLevel.WARN", "test debug");
-    Log.w("LogLevel.WARN", "test warning");
-    Log.e("LogLevel.WARN", "test error");
-  }
-  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java b/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
index 5b6d273..e981c69 100644
--- a/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
@@ -19,7 +19,6 @@
 package com.taobao.weex.utils;
 
 import android.text.TextUtils;
-import android.util.Log;
 
 import com.taobao.weappplus_sdk.BuildConfig;
 import com.taobao.weex.WXEnvironment;
@@ -50,7 +49,7 @@ import static org.mockito.Matchers.any;
 @RunWith(PowerMockRunner.class)
 @Config(constants = BuildConfig.class, sdk = 19)
 @PowerMockIgnore( {"org.mockito.*", "org.robolectric.*", "android.*"})
-@PrepareForTest( {WXEnvironment.class, WXViewUtils.class, WXSDKInstance.class, TextUtils.class, Log.class, WXUtils.class, WXLogUtils.class})
+@PrepareForTest( {WXEnvironment.class, WXViewUtils.class, WXSDKInstance.class, TextUtils.class})
 public class WXUtilsTest extends TestCase {
 
     public static final float TEST_DENSITY = 3.0f;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
----------------------------------------------------------------------
diff --git a/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java b/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
index 1343f60..b686f7c 100644
--- a/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
+++ b/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
@@ -204,21 +204,6 @@ public class WXWebsocketBridge implements IWXBridge,WXWebSocketManager.JSDebugge
     }
 
     @Override
-    public int initFrameworkEnv(String scriptsFramework,WXParams params, String cacheDir, boolean pieSupport) {
-        if (!mInit) {
-            return -1;
-        }
-
-        Map<String, Object> map = new HashMap<>();
-        map.put("method", "evalFramework");
-        ArrayList<String> args = new ArrayList<>();
-        args.add(scriptsFramework);
-        map.put("arguments", args);
-        WXWebSocketManager.getInstance().sendMessage(JSON.toJSONString(map));
-        return 0;
-    }
-
-    @Override
     public void takeHeapSnapshot(String filename) {}
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/dangerfile.js
----------------------------------------------------------------------
diff --git a/dangerfile.js b/dangerfile.js
index 616f27a..97c4146 100644
--- a/dangerfile.js
+++ b/dangerfile.js
@@ -273,15 +273,6 @@ filesToVerifySrcHeader.forEach(filepath => {
       return;
     }
   }
-
-  // check cn for source code
-  var reg = /[\u4e00-\u9FA5]+/; 
-  var res = reg.test(content);
-  if(res){
-    console.error("Code file "+ filepath +" has cn source code.");
-    fail("Code file "+ filepath +" has cn source code.");
-    return ;
-  }
 });
 
 
@@ -316,12 +307,11 @@ function findReviewer(resolve, reject) {
     number: danger.github.pr.number,
     headers: {Accept: 'application/vnd.github.diff',"user-agent": "node.js"}
   }, function (err, result) {
+    console.log('parseDeleteAndNormalLines')
     if ("undefined" === typeof result || "undefined" === typeof result.data || err) {
-      console.log('result:'+result+', error:'+err);
       resolve()
       return
     }
-    console.log('result:'+result);
     parseDeleteAndNormalLines(result.data, fileToDeletedLinesMap, fileToNormalLinesMap)
     console.log('getContent')
     var promises = danger.git.modified_files.map(function(file) {
@@ -376,29 +366,21 @@ function getContent(url) {
 
 function parseDeleteAndNormalLines(diffData, fileToDeletedLinesMap, fileToNormalLinesMap) {
   try {
-    console.log('parseDeleteAndNormalLines')
     var diffs = parseDiff(diffData)
-    console.log('diffs:'+diffs)
-    if(diffs&&diffs instanceof Array){
-      diffs.forEach(diff => {
-        fileToDeletedLinesMap[diff.from] = [];
-        fileToNormalLinesMap[diff.from] = [];
-        if(diff&&diff.chunks&&diff.chunks instanceof Array){
-          diff.chunks.forEach(chunk => {
-            if(chunk&&chunk.changes&&chunk.changes instanceof Array){
-              chunk.changes.forEach(change => {
-                if (change&&change.del) {
-                  fileToDeletedLinesMap[diff.from].push(change.ln)
-                }
-                if (change&&change.normal) {
-                  fileToNormalLinesMap[diff.from].push(change.ln1)
-                }
-              })
-            }
-          })
-        }
+    diffs.forEach(diff => {
+      fileToDeletedLinesMap[diff.from] = [];
+      fileToNormalLinesMap[diff.from] = [];
+      diff.chunks.forEach(chunk => {
+        chunk.changes.forEach(change => {
+          if (change.del) {
+            fileToDeletedLinesMap[diff.from].push(change.ln)
+          }
+          if (change.normal) {
+            fileToNormalLinesMap[diff.from].push(change.ln1)
+          }
+        })
       })
-    }
+    })
   } catch (error) {
     console.log(error)
   }
@@ -459,7 +441,6 @@ function findBlameReviewers(fileToDeletedLinesMap, fileToNormalLinesMap, fileToB
 
   console.log('blame point:', reviewers)
   var names = Object.keys(reviewers)
-  if(!names||!names instanceof Array||names.length<=0)return;
   names.sort((name1, name2) => {
     return reviewers[name1] > reviewers[name2] ? -1 : 1
   })

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/source/cn/guide/contributing.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/contributing.md b/doc/source/cn/guide/contributing.md
index fd3138d..36db1f9 100644
--- a/doc/source/cn/guide/contributing.md
+++ b/doc/source/cn/guide/contributing.md
@@ -25,24 +25,23 @@ version: 2.1
 ## 分支管理 (英)
 
 ```
-release
+master
  ↑
-{version}
- ↑
-master         <--- PR(feature/hotfix/typo)
+dev         <--- PR(hotfix/typo/3rd-PR)
+ ↑ PR
+{domain}-feature-{date}
 ```
 
 0. `master` branch
-    0. `master` is the stable developing branch.
-    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `master `***.
-0. `{version}` branch
-    0. `{version}` is used for every version which we consider for stable publish.
-    0. e.g. `v0.16`
-0. `release` branch
-    0. `release` is the latest release branch,we will make tag and publish version on this branch.
-
-### 用于PR的分支命名
-
+    0. `master` is the latest (pre-)release branch.
+0. `dev` branch
+    0. `dev` is the stable developing branch.
+    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `dev`***.
+0. `{domain}-feature-{date}` branch
+    0. The branch for a developing iteration, e.g. `android-feature-20160607` is an android developing iteration which is done at 2016.06.07. `{domain}` consists of `android`, `ios`, `jsfm` and `html5`. 
+    0. **DO NOT commit any PR to such a branch**.
+
+### 分支命名
 
 ```
 {module}-{action}-{shortName}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/source/guide/contributing.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/contributing.md b/doc/source/guide/contributing.md
index 00cb979..ea824f4 100644
--- a/doc/source/guide/contributing.md
+++ b/doc/source/guide/contributing.md
@@ -25,23 +25,23 @@ Besides Weex dev mailing list, we also have some other mailing lists for you. Yo
 ## Branch Management
 
 ```
-release
+master
  ↑
-{version}
- ↑
-master         <--- PR(feature/hotfix/typo)
+dev         <--- PR(hotfix/typo/3rd-PR)
+ ↑ PR
+{domain}-feature-{date}
 ```
 
 0. `master` branch
-    0. `master` is the stable developing branch.
-    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `master `***.
-0. `{version}` branch
-    0. `{version}` is used for every version which we consider for stable publish.
-    0. e.g. `v0.16`
-0. `release` branch
-    0. `release` is the latest release branch,we will make tag and publish version on this branch.
-
-### Branch Name For PR
+    0. `master` is the latest (pre-)release branch.
+0. `dev` branch
+    0. `dev` is the stable developing branch.
+    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `dev`***.
+0. `{domain}-feature-{date}` branch
+    0. The branch for a developing iteration, e.g. `android-feature-20160607` is an android developing iteration which is done at 2016.06.07. `{domain}` consists of `android`, `ios`, `jsfm` and `html5`. 
+    0. **DO NOT commit any PR to such a branch**.
+
+### Branch Name 
 
 ```
 {module}-{action}-{shortName}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/source/references/platform-difference.md
----------------------------------------------------------------------
diff --git a/doc/source/references/platform-difference.md b/doc/source/references/platform-difference.md
deleted file mode 100644
index 0aadfae..0000000
--- a/doc/source/references/platform-difference.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Platform Differences Between Weex and Web
-type: references
-order: 12
-version: 2.1
-has_chapter_content: true
----
-
-# Platform Differences Between Weex and Web
-
-Work in progresss.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/source/references/platfrom-difference.md
----------------------------------------------------------------------
diff --git a/doc/source/references/platfrom-difference.md b/doc/source/references/platfrom-difference.md
new file mode 100644
index 0000000..0aadfae
--- /dev/null
+++ b/doc/source/references/platfrom-difference.md
@@ -0,0 +1,11 @@
+---
+title: Platform Differences Between Weex and Web
+type: references
+order: 12
+version: 2.1
+has_chapter_content: true
+---
+
+# Platform Differences Between Weex and Web
+
+Work in progresss.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/source/references/vue/difference-with-web.md
----------------------------------------------------------------------
diff --git a/doc/source/references/vue/difference-with-web.md b/doc/source/references/vue/difference-with-web.md
index b750591..2af11f9 100644
--- a/doc/source/references/vue/difference-with-web.md
+++ b/doc/source/references/vue/difference-with-web.md
@@ -9,7 +9,7 @@ version: 2.1
 
 ## Platform Differences
 
-Vue.js was designed for the Web platform at the begining. Although it can be based on Weex to develop native applications, there are still many differences between web and native. See [Platform Differences Between Weex and Web](../platform-difference.html) for more details.
+Vue.js was designed for the Web platform at the begining. Although it can be based on Weex to develop native applications, there are still many differences between web and native. See [Platform Differences Between Weex and Web](../ platform-difference.html) for more details.
 
 Due to those differences, Weex doesn't support those features in Vue.js (mostly are DOM-related):
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/themes/weex/layout/_partial/article.ejs
----------------------------------------------------------------------
diff --git a/doc/themes/weex/layout/_partial/article.ejs b/doc/themes/weex/layout/_partial/article.ejs
index e7052b7..3ee5b2a 100644
--- a/doc/themes/weex/layout/_partial/article.ejs
+++ b/doc/themes/weex/layout/_partial/article.ejs
@@ -8,6 +8,4 @@
   <% if (page_type === 'article') { %>
      <%- partial('_partial/post/nav') %>
   <% } %>
-  <%- partial('footer') %>
-  <%- partial('after-footer') %>
 </article>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/themes/weex/layout/index.ejs
----------------------------------------------------------------------
diff --git a/doc/themes/weex/layout/index.ejs b/doc/themes/weex/layout/index.ejs
index b713fd4..4a1ad87 100644
--- a/doc/themes/weex/layout/index.ejs
+++ b/doc/themes/weex/layout/index.ejs
@@ -250,9 +250,6 @@
   </div>
 </div>
 <a href="javascript:;" id="back2top" class="back2top"><span class="iconfont icon-arrow-small"></span></a>
-<%- partial('_partial/footer') %>
-<%- partial('_partial/after-footer') %>
-
 <%- js('js/swiper.min') %>
 <%- js('js/velocity.js') %>
 <script>

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/themes/weex/layout/layout.ejs
----------------------------------------------------------------------
diff --git a/doc/themes/weex/layout/layout.ejs b/doc/themes/weex/layout/layout.ejs
index ba6dee3..df3b12b 100644
--- a/doc/themes/weex/layout/layout.ejs
+++ b/doc/themes/weex/layout/layout.ejs
@@ -9,6 +9,8 @@
   <%- partial('_partial/sidebar', {post: page, page_type: page_type}) %>
   <%- body %>
   
+  <%- partial('_partial/footer') %>
+  <%- partial('_partial/after-footer') %>
   <%- js('js/reqwest.js') %>
   <%- js('js/common.js') %>
   <% if (config.docsearch.enable){ %>    

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/themes/weex/source/css/common.scss
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/css/common.scss b/doc/themes/weex/source/css/common.scss
index d03be9f..10c25cf 100644
--- a/doc/themes/weex/source/css/common.scss
+++ b/doc/themes/weex/source/css/common.scss
@@ -17,9 +17,9 @@ html, body {
 }
 
 body {
-  background: $bg-white;
+  background: $bg-gray;
   // font-family: Exo,'-apple-system','Open Sans',HelveticaNeue-Light,'Helvetica Neue Light','Helvetica Neue','Hiragino Sans GB','Microsoft YaHei',Helvetica,Arial,sans-serif;
-  font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
+  font-family: Lato, "Microsoft Jhenghei", "Hiragino Sans GB", "Microsoft YaHei", sans-serif,'-apple-system','Open Sans',HelveticaNeue-Light,'Helvetica Neue Light';
   // font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei',sans-serif;
   // font-size:62.5%;max-height:100%;
   font-size: 14px;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/themes/weex/source/css/partial/header.scss
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/css/partial/header.scss b/doc/themes/weex/source/css/partial/header.scss
index a45d8f7..ac02f1a 100644
--- a/doc/themes/weex/source/css/partial/header.scss
+++ b/doc/themes/weex/source/css/partial/header.scss
@@ -6,7 +6,7 @@
   padding: 0 40px;
   position: fixed;
   background-color: rgba(255, 255, 255, .95);
-  box-shadow: 0 0 1px rgba(0,0,0,0.25);
+  box-shadow: 3px 2px 4px 0 rgba(0,0,0,0.12);
   top: 0;
   left: 0;
   right: 0;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/themes/weex/source/css/post.scss
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/css/post.scss b/doc/themes/weex/source/css/post.scss
index 370d90c..f3a6544 100644
--- a/doc/themes/weex/source/css/post.scss
+++ b/doc/themes/weex/source/css/post.scss
@@ -50,15 +50,14 @@
   }
 
   .doc-nav {
-    position: fixed;
+    position: absolute;
     top: 72px;
     left: 0;
     bottom: 0;
-    width: 260px;
-    padding: 40px 20px 60px 60px;
-    background: $bg-white;
+    background: $bg-gray;
     width: 300px;
     z-index: 999;
+    padding: 43px 15px 15px;
     overflow-x: hidden;
     overflow-y: auto;
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/doc/themes/weex/source/css/variable.scss
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/css/variable.scss b/doc/themes/weex/source/css/variable.scss
index cbe4b12..50e35cd 100644
--- a/doc/themes/weex/source/css/variable.scss
+++ b/doc/themes/weex/source/css/variable.scss
@@ -6,7 +6,7 @@ $text-light-black: #333;
 $text-black: #333;
 $text-white: #fff;
 $text-gray: #999;
-$text-blue: #088bc3;
+$text-blue: #00BDFF;
 $bg-blue: $text-blue;
 $bg-light-blue: #23CEFD;
 $bg-white: #fff;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/html5/runtime/api/WeexInstance.js
----------------------------------------------------------------------
diff --git a/html5/runtime/api/WeexInstance.js b/html5/runtime/api/WeexInstance.js
deleted file mode 100644
index 2093f17..0000000
--- a/html5/runtime/api/WeexInstance.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import Document from '../vdom/Document'
-import { isRegisteredModule, getModuleDescription } from './module'
-import { isRegisteredComponent } from './component'
-
-const moduleProxies = {}
-
-function setId (weex, id) {
-  Object.defineProperty(weex, '[[CurrentInstanceId]]', { value: id })
-}
-
-function getId (weex) {
-  return weex['[[CurrentInstanceId]]']
-}
-
-function moduleGetter (module, method, taskCenter) {
-  return (...args) => taskCenter.send('module', { module, method }, args)
-}
-
-export default class WeexInstance {
-  constructor (id, config) {
-    setId(this, id)
-    this.config = config || {}
-    this.document = new Document(id, this.config.bundleUrl)
-    this.requireModule = this.requireModule.bind(this)
-    this.isRegisteredModule = isRegisteredModule
-    this.isRegisteredComponent = isRegisteredComponent
-  }
-
-  requireModule (moduleName) {
-    const id = getId(this)
-    if (!(id && this.document && this.document.taskCenter)) {
-      console.error(`[JS Framework] invalid instance id "${id}"`)
-      return
-    }
-
-    // warn for unknown module
-    if (!isRegisteredModule(moduleName)) {
-      console.warn(`[JS Framework] using unregistered weex module "${moduleName}"`)
-      return
-    }
-
-    // create new module proxy
-    if (!moduleProxies[moduleName]) {
-      const moduleDefine = getModuleDescription(moduleName)
-      const taskCenter = this.document.taskCenter
-
-      // create registered module apis
-      const moduleApis = {}
-      for (const methodName in moduleDefine) {
-        Object.defineProperty(moduleApis, methodName, {
-          enumerable: true,
-          configurable: true,
-          get: () => moduleGetter(moduleName, methodName, taskCenter),
-          set (fn) {
-            if (typeof fn === 'function') {
-              return taskCenter.send('module', {
-                module: moduleName,
-                method: methodName
-              }, [fn])
-            }
-          }
-        })
-      }
-
-      // create module Proxy
-      if (typeof Proxy === 'function') {
-        moduleProxies[moduleName] = new Proxy(moduleApis, {
-          get (target, methodName) {
-            if (methodName in target) {
-              return target[methodName]
-            }
-            console.warn(`[JS Framework] using unregistered method "${moduleName}.${methodName}"`)
-            return moduleGetter(moduleName, methodName, taskCenter)
-          }
-        })
-      }
-      else {
-        moduleProxies[moduleName] = moduleApis
-      }
-    }
-
-    return moduleProxies[moduleName]
-  }
-
-  supports (condition) {
-    if (typeof condition !== 'string') return null
-
-    const res = condition.match(/^@(\w+)\/(\w+)(\.(\w+))?$/i)
-    if (res) {
-      const type = res[1]
-      const name = res[2]
-      const method = res[4]
-      switch (type) {
-        case 'module': return isRegisteredModule(name, method)
-        case 'component': return isRegisteredComponent(name)
-      }
-    }
-
-    return null
-  }
-
-  // registerStyleSheet (styles) {
-  //   if (this.document) {
-  //     this.document.registerStyleSheet(styles)
-  //   }
-  // }
-}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/html5/runtime/api/component.js
----------------------------------------------------------------------
diff --git a/html5/runtime/api/component.js b/html5/runtime/api/component.js
deleted file mode 100644
index 8a56961..0000000
--- a/html5/runtime/api/component.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { registerElement } from '../vdom/WeexElement'
-
-const weexComponents = {}
-
-/**
- * Register native components information.
- * @param {array} newComponents
- */
-export function registerComponents (newComponents) {
-  if (Array.isArray(newComponents)) {
-    newComponents.forEach(component => {
-      if (!component) {
-        return
-      }
-      if (typeof component === 'string') {
-        weexComponents[component] = true
-      }
-      else if (typeof component === 'object' && typeof component.type === 'string') {
-        weexComponents[component.type] = component
-        registerElement(component.type, component.methods)
-      }
-    })
-  }
-}
-
-/**
- * Check whether the component has been registered.
- * @param {String} component name
- */
-export function isRegisteredComponent (name) {
-  return !!weexComponents[name]
-}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/html5/runtime/api/init.js
----------------------------------------------------------------------
diff --git a/html5/runtime/api/init.js b/html5/runtime/api/init.js
index cad0179..024afa7 100644
--- a/html5/runtime/api/init.js
+++ b/html5/runtime/api/init.js
@@ -18,10 +18,8 @@
  */
 
 import { init as initTaskHandler } from '../bridge/TaskCenter'
-import { registerModules } from './module'
-import { registerComponents } from './component'
+import { registerElement } from '../vdom/WeexElement'
 import { services, register, unregister } from './service'
-import WeexInstance from './WeexInstance'
 
 let frameworks
 let runtimeConfig
@@ -97,61 +95,58 @@ function createInstance (id, code, config, data) {
   config = JSON.parse(JSON.stringify(config || {}))
   config.env = JSON.parse(JSON.stringify(global.WXEnvironment || {}))
 
-  const weex = new WeexInstance(id, config)
-  Object.freeze(weex)
-
-  const runtimeEnv = {
-    weex,
-    config, // TODO: deprecated
+  const context = {
+    config,
     created: Date.now(),
     framework: bundleType
   }
-  runtimeEnv.services = createServices(id, runtimeEnv, runtimeConfig)
-  instanceMap[id] = runtimeEnv
+  context.services = createServices(id, context, runtimeConfig)
+  instanceMap[id] = context
 
-  const runtimeContext = Object.create(null)
-  Object.assign(runtimeContext, runtimeEnv.services, { weex })
+  if (process.env.NODE_ENV === 'development') {
+    console.debug(`[JS Framework] create an ${bundleType} instance`)
+  }
 
-  const framework = runtimeConfig.frameworks[bundleType]
-  if (!framework) {
+  const fm = frameworks[bundleType]
+  if (!fm) {
     return new Error(`invalid bundle type "${bundleType}".`)
   }
 
-  // run create instance
-  if (typeof framework.prepareInstanceContext === 'function') {
-    const instanceContext = framework.prepareInstanceContext(runtimeContext)
-    return runInContext(code, instanceContext)
-  }
-  return framework.createInstance(id, code, config, data, runtimeEnv)
+  return fm.createInstance(id, code, config, data, context)
+}
+
+const methods = {
+  createInstance,
+  registerService: register,
+  unregisterService: unregister
 }
 
 /**
- * Run js code in a specific context.
- * @param {string} code
- * @param {object} context
+ * Register methods which init each frameworks.
+ * @param {string} methodName
  */
-function runInContext (code, context) {
-  const keys = []
-  const args = []
-  for (const key in context) {
-    keys.push(key)
-    args.push(context[key])
+function genInit (methodName) {
+  methods[methodName] = function (...args) {
+    if (methodName === 'registerComponents') {
+      checkComponentMethods(args[0])
+    }
+    for (const name in frameworks) {
+      const framework = frameworks[name]
+      if (framework && framework[methodName]) {
+        framework[methodName](...args)
+      }
+    }
   }
-
-  const bundle = `
-    (function (global) {
-      "use strict";
-      ${code}
-    })(Object.create(this))
-  `
-
-  return (new Function(...keys, bundle))(...args)
 }
 
-const methods = {
-  createInstance,
-  registerService: register,
-  unregisterService: unregister
+function checkComponentMethods (components) {
+  if (Array.isArray(components)) {
+    components.forEach((name) => {
+      if (name && name.type && name.methods) {
+        registerElement(name.type, name.methods)
+      }
+    })
+  }
 }
 
 /**
@@ -208,27 +203,6 @@ function adaptInstance (methodName, nativeMethodName) {
   }
 }
 
-/**
- * Register methods which init each frameworks.
- * @param {string} methodName
- * @param {function} sharedMethod
- */
-function adaptMethod (methodName, sharedMethod) {
-  methods[methodName] = function (...args) {
-    if (typeof sharedMethod === 'function') {
-      sharedMethod(...args)
-    }
-
-    // TODO: deprecated
-    for (const name in runtimeConfig.frameworks) {
-      const framework = runtimeConfig.frameworks[name]
-      if (framework && framework[methodName]) {
-        framework[methodName](...args)
-      }
-    }
-  }
-}
-
 export default function init (config) {
   runtimeConfig = config || {}
   frameworks = runtimeConfig.frameworks || {}
@@ -242,9 +216,8 @@ export default function init (config) {
     framework.init(config)
   }
 
-  adaptMethod('registerComponents', registerComponents)
-  adaptMethod('registerModules', registerModules)
-  adaptMethod('registerMethods')
+  // @todo: The method `registerMethods` will be re-designed or removed later.
+  ; ['registerComponents', 'registerModules', 'registerMethods'].forEach(genInit)
 
   ; ['destroyInstance', 'refreshInstance', 'receiveTasks', 'getRoot'].forEach(genInstance)
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/html5/runtime/api/module.js
----------------------------------------------------------------------
diff --git a/html5/runtime/api/module.js b/html5/runtime/api/module.js
deleted file mode 100644
index df26b92..0000000
--- a/html5/runtime/api/module.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-const weexModules = {}
-
-/**
- * Register native modules information.
- * @param {object} newModules
- */
-export function registerModules (newModules) {
-  for (const name in newModules) {
-    if (!weexModules[name]) {
-      weexModules[name] = {}
-    }
-    newModules[name].forEach(method => {
-      if (typeof method === 'string') {
-        weexModules[name][method] = true
-      }
-      else {
-        weexModules[name][method.name] = method.args
-      }
-    })
-  }
-}
-
-/**
- * Check whether the module or the method has been registered.
- * @param {String} module name
- * @param {String} method name (optional)
- */
-export function isRegisteredModule (name, method) {
-  if (typeof method === 'string') {
-    return !!(weexModules[name] && weexModules[name][method])
-  }
-  return !!weexModules[name]
-}
-
-export function getModuleDescription (name) {
-  return weexModules[name]
-}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/html5/runtime/vdom/Element.js
----------------------------------------------------------------------
diff --git a/html5/runtime/vdom/Element.js b/html5/runtime/vdom/Element.js
index 15837f2..6663b51 100644
--- a/html5/runtime/vdom/Element.js
+++ b/html5/runtime/vdom/Element.js
@@ -409,7 +409,7 @@ export default class Element extends Node {
 
     if (!isStopPropagation
       && isBubble
-      && (BUBBLE_EVENTS.indexOf(type) !== -1)
+      && BUBBLE_EVENTS.includes(type)
       && this.parentNode
       && this.parentNode.fireEvent) {
       event.currentTarget = this.parentNode

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 749cb8c..8addaca 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -264,10 +264,6 @@
 		77E65A161C155EB5008B8775 /* WXTextComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E65A141C155EB5008B8775 /* WXTextComponent.m */; };
 		77E65A191C155F25008B8775 /* WXScrollerComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 77E65A171C155F25008B8775 /* WXScrollerComponent.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		77E65A1A1C155F25008B8775 /* WXScrollerComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E65A181C155F25008B8775 /* WXScrollerComponent.m */; };
-		841CD1031F9739890081196D /* WXExceptionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 841CD1021F9739890081196D /* WXExceptionUtils.m */; };
-		841CD1051F974DFA0081196D /* WXExceptionUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 841CD1041F97399C0081196D /* WXExceptionUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		841CD1061F974DFA0081196D /* WXExceptionUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 841CD1041F97399C0081196D /* WXExceptionUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		841CD1071F974E000081196D /* WXExceptionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 841CD1021F9739890081196D /* WXExceptionUtils.m */; };
 		C401945E1E344E8300D19C31 /* WXFloatCompareTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C401945D1E344E8300D19C31 /* WXFloatCompareTests.m */; };
 		C41E1A971DC1FD15009C7F90 /* WXDatePickerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */; };
 		C41E1A981DC1FD15009C7F90 /* WXDatePickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */; };
@@ -855,8 +851,6 @@
 		77E65A141C155EB5008B8775 /* WXTextComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXTextComponent.m; sourceTree = "<group>"; };
 		77E65A171C155F25008B8775 /* WXScrollerComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXScrollerComponent.h; sourceTree = "<group>"; };
 		77E65A181C155F25008B8775 /* WXScrollerComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXScrollerComponent.m; sourceTree = "<group>"; };
-		841CD1021F9739890081196D /* WXExceptionUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXExceptionUtils.m; sourceTree = "<group>"; };
-		841CD1041F97399C0081196D /* WXExceptionUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXExceptionUtils.h; sourceTree = "<group>"; };
 		C401945D1E344E8300D19C31 /* WXFloatCompareTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXFloatCompareTests.m; sourceTree = "<group>"; };
 		C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXDatePickerManager.h; sourceTree = "<group>"; };
 		C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXDatePickerManager.m; sourceTree = "<group>"; };
@@ -1088,8 +1082,6 @@
 				2AAFC1B41C48DFF70026D2FE /* WXSDKError.h */,
 				749DC2791D40827B009E1C91 /* WXMonitor.h */,
 				749DC27A1D40827B009E1C91 /* WXMonitor.m */,
-				841CD1041F97399C0081196D /* WXExceptionUtils.h */,
-				841CD1021F9739890081196D /* WXExceptionUtils.m */,
 			);
 			name = Monitor;
 			path = WeexSDK/Sources/Monitor;
@@ -1610,7 +1602,6 @@
 				DCA0EF641D6EED6F00CB18B9 /* WXGlobalEventModule.h in Headers */,
 				2A837AB21CD9DE9200AEDF03 /* WXLoadingComponent.h in Headers */,
 				DCA446271EFA5DAF00D0CFA8 /* WeexSDK.h in Headers */,
-				841CD1051F974DFA0081196D /* WXExceptionUtils.h in Headers */,
 				C42E8F9B1F39DF07001EBE9D /* WXTracingProtocol.h in Headers */,
 				7423899F1C32733800D748CA /* WXType.h in Headers */,
 				59A582FC1CF5B17B0081FD3E /* WXBridgeContext.h in Headers */,
@@ -1802,7 +1793,6 @@
 				DCA445D51EFA598200D0CFA8 /* WXComponent+PseudoClassManagement.h in Headers */,
 				DCA4460E1EFA5A7E00D0CFA8 /* WXLength.h in Headers */,
 				DCA445FA1EFA5A3A00D0CFA8 /* WXNavigatorModule.h in Headers */,
-				841CD1061F974DFA0081196D /* WXExceptionUtils.h in Headers */,
 				DCA446081EFA5A6A00D0CFA8 /* NSArray+Weex.h in Headers */,
 				74B81AE51F73C3E900D3A61D /* WXRecycleListDataManager.h in Headers */,
 				DCA445F21EFA5A2300D0CFA8 /* WXHeaderComponent.h in Headers */,
@@ -2210,7 +2200,6 @@
 				7463192A1C71B92600EFEBD4 /* WXModalUIModule.m in Sources */,
 				77D161501C02E3880010B15B /* WXUtility.m in Sources */,
 				74A4BA9F1CB3C0A100195969 /* WXHandlerFactory.m in Sources */,
-				841CD1031F9739890081196D /* WXExceptionUtils.m in Sources */,
 				C4E97D341F1EF46D00ABC314 /* WXTracingManager.m in Sources */,
 				742AD72F1DF98C45007DC46C /* WXResourceRequest.m in Sources */,
 				7461F8931CFB373100F62D44 /* WXLayer.m in Sources */,
@@ -2289,7 +2278,6 @@
 				DCA4455E1EFA55B300D0CFA8 /* WXFooterComponent.m in Sources */,
 				DCA4455F1EFA55B300D0CFA8 /* WXNavigationDefaultImpl.m in Sources */,
 				74B81AF21F73C3E900D3A61D /* WXJSASTParser.mm in Sources */,
-				841CD1071F974E000081196D /* WXExceptionUtils.m in Sources */,
 				DCA445601EFA55B300D0CFA8 /* WXURLRewriteDefaultImpl.m in Sources */,
 				DCA445611EFA55B300D0CFA8 /* WXPrerenderManager.m in Sources */,
 				DCA445631EFA55B300D0CFA8 /* WXPickerModule.m in Sources */,

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
index 24801cc..7985fe5 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
@@ -40,7 +40,6 @@
 #import "WXSDKInstance_private.h"
 #import "WXPrerenderManager.h"
 #import "WXTracingManager.h"
-#import "WXExceptionUtils.h"
 
 #define SuppressPerformSelectorLeakWarning(Stuff) \
 do { \
@@ -507,10 +506,8 @@ _Pragma("clang diagnostic pop") \
     WX_MONITOR_PERF_END(WXPTFrameworkExecute);
     
     if ([self.jsBridge exception]) {
-        NSString *exception = [[self.jsBridge exception] toString];
-        NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_SDK_INIT_JSFM_INIT_FAILED] %@",exception];
-        [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_SDK_INIT" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_SDK_INIT] function:@"" exception:errMsg extParams:nil];
-        WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_EXECUTE, errMsg);
+        NSString *message = [NSString stringWithFormat:@"JSFramework executes error: %@", [self.jsBridge exception]];
+        WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_EXECUTE, message);
     } else {
         WX_MONITOR_SUCCESS(WXMTJSFramework);
         //the JSFramework has been load successfully.
@@ -571,10 +568,8 @@ _Pragma("clang diagnostic pop") \
         [self.jsBridge executeJavascript:script];
         
         if ([self.jsBridge exception]) {
-            NSString *exception = [[self.jsBridge exception] toString];
-            NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_INVOKE_JSSERVICE_EXECUTE] %@",exception];
-            [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_INVOKE" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_INVOKE] function:@"" exception:errMsg extParams:nil];
-            WX_MONITOR_FAIL(WXMTJSService, WX_ERR_JSFRAMEWORK_EXECUTE, errMsg);
+            NSString *message = [NSString stringWithFormat:@"JSService executes error: %@", [self.jsBridge exception]];
+            WX_MONITOR_FAIL(WXMTJSService, WX_ERR_JSFRAMEWORK_EXECUTE, message);
         } else {
             // success
         }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
index f076817..ec81b22 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
@@ -36,7 +36,6 @@
 #import "WXSDKManager.h"
 #import "WXExtendCallNativeManager.h"
 #import "WXTracingManager.h"
-#import "WXExceptionUtils.h"
 
 #import <dlfcn.h>
 
@@ -155,17 +154,14 @@
         
         _jsContext.exceptionHandler = ^(JSContext *context, JSValue *exception){
             context.exception = exception;
+            NSString *message = [NSString stringWithFormat:@"[%@:%@:%@] %@\n%@", exception[@"sourceURL"], exception[@"line"], exception[@"column"], exception, [exception[@"stack"] toObject]];
+            id<WXJSExceptionProtocol> jsExceptionHandler = [WXHandlerFactory handlerForProtocol:@protocol(WXJSExceptionProtocol)];
             
             WXSDKInstance *instance = [WXSDKEngine topInstance];
-            NSString *bundleUrl = [instance.scriptURL absoluteString]?:@"WX_KEY_EXCEPTION_WXBRIDGE";
-            NSString *errorCode = [NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_WXBRIDGE];
-            NSString *message = [NSString stringWithFormat:@"[WX_KEY_EXCEPTION_WXBRIDGE] [%@:%@:%@] %@\n%@", exception[@"sourceURL"], exception[@"line"], exception[@"column"], [exception toString], [exception[@"stack"] toObject]];
-            NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:
-                instance.userInfo[@"jsMainBundleStringContentLength"]?:@"",@"jsMainBundleStringContentLength",
-                instance.userInfo[@"jsMainBundleStringContentMd5"]?:@"",@"jsMainBundleStringContentMd5",nil];
-            WXJSExceptionInfo * jsExceptionInfo = [[WXJSExceptionInfo alloc] initWithInstanceId:instance.instanceId bundleUrl:bundleUrl errorCode:errorCode functionName:@"" exception:message userInfo:userInfo];
-            
-            [WXExceptionUtils commitCriticalExceptionRT:jsExceptionInfo];
+            WXJSExceptionInfo * jsExceptionInfo = [[WXJSExceptionInfo alloc] initWithInstanceId:instance.instanceId bundleUrl:[instance.scriptURL absoluteString] errorCode:[NSString stringWithFormat:@"%d", WX_ERR_JS_EXECUTE] functionName:@"" exception:[NSString stringWithFormat:@"[%@:%@] %@\n%@ \njsMainBundleStringContentLength:%@\njsMainBundleStringContentMd5:%@",exception[@"line"], exception[@"column"],[exception toString], exception[@"stack"], instance.userInfo[@"jsMainBundleStringContentLength"]?:@"",instance.userInfo[@"jsMainBundleStringContentMd5"]?:@""] userInfo:nil];
+            if ([jsExceptionHandler respondsToSelector:@selector(onJSException:)]) {
+                [jsExceptionHandler onJSException:jsExceptionInfo];
+            }
             WX_MONITOR_FAIL(WXMTJSBridge, WX_ERR_JS_EXECUTE, message);
             if (instance.onJSRuntimeException) {
                 instance.onJSRuntimeException(jsExceptionInfo);

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
index 929dd1a..48eda1a 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
@@ -662,8 +662,8 @@ typedef NS_ENUM(NSInteger, Direction) {
     
     if (_sliderChangeEvent) {
         [self fireEvent:@"change" params:@{@"index":@(index)} domChanges:@{@"attrs": @{@"index": @(index)}}];
+        self.currentIndex = index;
     }
-    self.currentIndex = index;
 }
 
 - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView



[09/18] incubator-weex git commit: Revert: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/pre-build/native-bundle-main.js
----------------------------------------------------------------------
diff --git a/pre-build/native-bundle-main.js b/pre-build/native-bundle-main.js
index fe65897..c5d06cf 100644
--- a/pre-build/native-bundle-main.js
+++ b/pre-build/native-bundle-main.js
@@ -1,8 +1,8 @@
-(this.nativeLog||function(e){console.log(e)})("START JS FRAMEWORK 0.22.7, Build 2017-10-19 18:34."),this.getJSFMVersion=function(){return"0.22.7"};var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){qn.Document=e.Document,qn.Element=e.Element,qn.Comment=e.Comment,qn.sendTasks=e.sendTasks}function t(e,t,n,r,o){void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={});var i=new qn.Document(e,n.bundleUrl),a={},s={id:e,data:r,document:i,callbacks:a},u=0;i.addCallback=function(e){return u++,a[u]=e,u},i.handleCallback=function(e,t,n){var r=a[e];return n&&delete a[e],r(t)},zn[e]=s;var c=Object.assign({Document:qn.Document,Element:qn.Element,Comment:qn.Comment,sendTasks:function(t){return qn.sendTasks(e,t,-1)},options:n,document:i},o),l=[],f=[];for(var p in c)l.push(p),f.push(c[p]);return l.push(t),(new(Function.prototy
 pe.bind.apply(Function,[null].concat(l)))).apply(void 0,f),qn.sendTasks(e,[{module:"dom",method:"createFinish",args:[]}],-1),s}function n(e){delete zn[e]}function r(e){return zn[e].document.body.toJSON()}function o(e,t){var n={fireEvent:function(e,t,n,r,o){var i=zn[e],a=i.document,s=a.getRef(t);return a.fireEvent(s,n,r,o)},callback:function(e,t,n,r){return zn[e].document.handleCallback(t,n,r)}};if((zn[e]||{}).document&&Array.isArray(t)){var r=[];return t.forEach(function(t){var o=n[t.method],i=[].concat(t.args);"function"==typeof o&&(i.unshift(e),r.push(o.apply(void 0,i)))}),r}}function i(e){return e&&e.__esModule?e.default:e}function a(e,t){return t={exports:{}},e(t,t.exports),t.exports}function s(e){console.warn("[JS Framework] Vm#$ is deprecated, please use Vm#$vm instead");var t=this._ids[e];if(t)return t.vm}function u(e){var t=this._ids[e];if(t)return t.el}function c(e){var t=this._ids[e];if(t)return t.vm}function l(e){return this._app.differ.then(function(){e()})}function f(e,
 t){console.warn("[JS Framework] Vm#$scrollTo is deprecated, please use \"require('@weex-module/dom').scrollTo(el, options)\" instead");var n=this.$el(e);if(n){this._app.requireModule("dom").scrollToElement(n.ref,{offset:t})}}function p(e,t,n){var r=this,o=this.$el(e);if(o&&t&&t.styles){this._app.requireModule("animation").transition(o.ref,t,function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];r._setStyle(o,t.styles),n&&n.apply(void 0,e)})}}function d(e){var t=this._app.options;return"function"==typeof e&&(console.warn("[JS Framework] the callback of Vm#$getConfig(callback) is deprecated, this api now can directly RETURN config info."),e(t)),t}function h(e,t){console.warn("[JS Framework] Vm#$sendHttp is deprecated, please use \"require('@weex-module/stream').sendHttp(params, callback)\" instead"),this._app.requireModule("stream").sendHttp(e,t)}function v(e){console.warn("[JS Framework] Vm#$openURL is deprecated, please use \"require('@weex-module/event').openURL(url)\" i
 nstead"),this._app.requireModule("event").openURL(e)}function y(e){console.warn("[JS Framework] Vm#$setTitle is deprecated, please use \"require('@weex-module/pageInfo').setTitle(title)\" instead"),this._app.requireModule("pageInfo").setTitle(e)}function m(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];console.warn("[JS Framework] Vm#$call is deprecated, please use \"require('@weex-module/moduleName')\" instead");var o=this._app.requireModule(e);o&&o[t]&&o[t].apply(o,n)}function _(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"==typeof Object.assign)Object.assign.apply(Object,[e].concat(t));else{var r=t.shift();for(var o in r)e[o]=r[o];t.length&&_.apply(void 0,[e].concat(t))}return e}function g(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function b(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function w(e,t){return fr.call(e,t)}function x(e,t){return function(n){var 
 r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}}function E(e){return null!==e&&"object"==typeof e}function O(e){return pr.call(e)===dr}function S(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function C(){return"object"==typeof nativeSet?nativeSet.create():new Bn}function k(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1).toLowerCase()}function j(e){return e.replace(vr,"").replace(yr,"")}function A(e){return e.replace(_r,"")}function I(){this.id=Er++,this.subs=[]}function T(e){I.target&&Or.push(I.target),I.target=e}function N(){I.target=Or.pop()}function P(){I.target=null,Or=[]}function M(e,t,n,r){r&&_(this,r);var o="function"==typeof t;this.vm=e,e._watchers.push(this),this.expression=t,this.cb=n,this.id=++Sr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=C(),this.newDepIds=C(),o&&(this.getter=t),this.value=this.lazy?void 0:this.get(),this.queued=this.shallow=!1}function $(e,t){var n,r,o,i;if(
 t||(t=Cr,t.clear()),o=Array.isArray(e),i=E(e),o||i){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(o)for(n=e.length;n--;)$(e[n],t);else if(i)for(r=Object.keys(e),n=r.length;n--;)$(e[r[n]],t)}}function R(e){if(this.value=e,this.dep=new I,g(e,"__ob__",this),Array.isArray(e)){(hr?D:F)(e,jr,Ar),this.observeArray(e)}else this.walk(e)}function D(e,t){e.__proto__=t}function F(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];g(e,i,t[i])}}function L(e,t){if(E(e)){var n;return w(e,"__ob__")&&e.__ob__ instanceof R?n=e.__ob__:(Array.isArray(e)||O(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new R(e)),n&&t&&n.addVm(t),n}}function W(e,t,n){var r=new I,o=Object.getOwnPropertyDescriptor(e,t);if(!o||!1!==o.configurable){var i=o&&o.get,a=o&&o.set,s=L(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=i?i.call(e):n;if(I.target&&(r.depend(),s&&s.dep.depend(),Array.isArray(t)))for(var o=void 0,a=0,u=t.length;a<u;a++)(o=t[a])&&o.__ob__&&o.__ob__.dep.depend(
 );return t},set:function(t){t!==(i?i.call(e):n)&&(a?a.call(e,t):n=t,s=L(t),r.notify())}})}}function U(e,t,n){if(Array.isArray(e))return e.splice(t,1,n);if(w(e,t))return void(e[t]=n);if(e._isVue)return void U(e._data,t,n);var r=e.__ob__;if(!r)return void(e[t]=n);if(r.convert(t,n),r.dep.notify(),r.vms)for(var o=r.vms.length;o--;){var i=r.vms[o];B(i,t)}return n}function V(e,t){if(w(e,t)){delete e[t];var n=e.__ob__;if(!n)return void(e._isVue&&delete e._data[t]);if(n.dep.notify(),n.vms)for(var r=n.vms.length;r--;){var o=n.vms[r];q(o,t)}}}function B(e,t){(Ir.indexOf(t)>-1||!S(t))&&Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return e._data[t]},set:function(n){e._data[t]=n}})}function q(e,t){S(t)||delete e[t]}function z(e){e._watchers=[],J(e),G(e),K(e)}function J(e){var t=e._data;O(t)||(t={});for(var n=Object.keys(t),r=n.length;r--;)B(e,n[r]);L(t,e)}function H(){}function G(e){var t=e._computed;if(t)for(var n in t){var r=t[n],o={enumerable:!0,configurable:!0};"fu
 nction"==typeof r?(o.get=X(r,e),o.set=H):(o.get=r.get?!1!==r.cache?X(r.get,e):x(r.get,e):H,o.set=r.set?x(r.set,e):H),Object.defineProperty(e,n,o)}}function X(e,t){var n=new M(t,e,null,{lazy:!0});return function(){return n.dirty&&n.evaluate(),I.target&&n.depend(),n.value}}function K(e){var t=e._methods;if(t)for(var n in t)e[n]=t[n]}function Z(e){var t=e.type,n=Nr[t];if("object"==typeof n)for(var r in n)if(null==e[r])e[r]=n[r];else if("object"===k(e[r])&&"object"===k(n[r]))for(var o in n[r])null==e[r][o]&&(e[r][o]=n[r][o])}function Q(e,t,n){oe(e,t,n.id,e),ie(e,t,n.attr),se(e,t,n.classList),ue(e,t,n.style),le(e,t,n.events)}function Y(e,t,n,r){t=t||{},n=n||{};var o=t._options||{},i=o.props;Array.isArray(i)&&(i=i.reduce(function(e,t){return e[t]=!0,e},{})),te(r,i,e,t),te(n.attr,i,e,t)}function ee(e,t,n,r){void 0===r&&(r={}),re(n.classList,e,t),ne(n.style,e,t),r.children?r.children[r.children.length-1]._vm=t:r._vm=t}function te(e,t,n,r){if(e){for(var o in e)!function(o){if(!t||t[o]){var i
 =e[o];if("function"==typeof i){var a=de(n,i,function(e){r[o]=e});r[o]=a}else r[o]=i}}(o)}}function ne(e,t,n){for(var r in e)!function(r){var o=e[r];if("function"==typeof o){var i=de(t,o,function(e){n._rootEl&&n._rootEl.setStyle(r,e)});n._rootEl.setStyle(r,i)}else n._rootEl&&n._rootEl.setStyle(r,o)}(r)}function re(e,t,n){function r(e,t){"array"===k(e)&&e.unshift(t)}var o=t._options&&t._options.style||{};if(n._rootEl){var i="@originalRootEl";if(o[i]=n._rootEl.classStyle,"function"==typeof e){var a=de(t,e,function(e){r(e,i),ae(n._rootEl,o,e)});r(a,i),ae(n._rootEl,o,a)}else null!=e&&(r(e,i),ae(n._rootEl,o,e))}}function oe(e,t,n,r){var o=Object.create(null);if(Object.defineProperties(o,{vm:{value:r,writable:!1,configurable:!1},el:{get:function(){return t||r._rootEl},configurable:!1}}),"function"==typeof n){var i=n;n=i.call(e),(n||0===n)&&(e._ids[n]=o),de(e,i,function(t){t&&(e._ids[t]=o)})}else n&&"string"==typeof n&&(e._ids[n]=o)}function ie(e,t,n){fe(e,t,"attr",n)}function ae(e,t,n){"st
 ring"==typeof n&&(n=n.split(/\s+/)),n.forEach(function(e,t){n.splice.apply(n,[t,1].concat(e.split(/\s+/)))});for(var r={},o=n.length,i=0;i<o;i++)!function(e){var o=t[n[e]];o&&Object.keys(o).forEach(function(e){r[e]=o[e]})}(i);e.setClassStyle(r)}function se(e,t,n){if("function"==typeof n||Array.isArray(n)){if(Array.isArray(n)&&!n.length)return void t.setClassStyle({});var r=e._options&&e._options.style||{};if("function"==typeof n){var o=de(e,n,function(e){ae(t,r,e)});ae(t,r,o)}else ae(t,r,n)}}function ue(e,t,n){fe(e,t,"style",n)}function ce(e,t,n,r){t.addEvent(n,x(r,e))}function le(e,t,n){if(n)for(var r=Object.keys(n),o=r.length;o--;){var i=r[o],a=n[i];"string"==typeof a&&((a=e[a])||console.warn('[JS Framework] The event handler "'+a+'" is not defined.')),ce(e,t,i,a)}}function fe(e,t,n,r){if(r)for(var o=Object.keys(r),i=o.length;i--;){var a=o[i],s=r[a];"function"==typeof s?pe(e,t,n,a,s):t[Pr[n]](a,s)}}function pe(e,t,n,r,o){var i=Pr[n],a=de(e,o,function(n){function o(){t[i](r,n)}var 
 a=e&&e._app&&e._app.differ;a?a.append("element",t.depth||0,t.ref,o):o()});t[i](r,a)}function de(e,t,n){return e._static?t.call(e,e):new M(e,t,function(e,t){"object"!=typeof e&&e===t||n(e)}).value}function he(e,t){return e._app.doc.createBody(t)}function ve(e,t){return e._app.doc.createElement(t)}function ye(e,t){var n=me(e),r=_e(e),o=Mr++;if(t.element){var i=t.updateMark;i?(i.element&&(i=i.end),t.element.insertAfter(r,i),t.element.insertAfter(n,i),t.updateMark=r):(t.element.insertBefore(n,t.end),t.element.insertBefore(r,t.end)),t=t.element}else t.appendChild(n),t.appendChild(r);return{start:n,end:r,element:t,blockId:o}}function me(e){return e._app.doc.createComment("start")}function _e(e){return e._app.doc.createComment("end")}function ge(e,t,n){if(n.element){var r=n.end,o=n.updateMark;if(n.children&&n.children.push(t),o){var i=be(e,t,o);return n.updateMark=t.element?t.end:t,i}if(!t.element)return n.element.insertBefore(t,r);n.element.insertBefore(t.start,r),n.element.insertBefore(t
 .end,r)}else{if(!t.element)return n.appendChild(t);n.appendChild(t.start),n.appendChild(t.end)}}function be(e,t,n){return t.element?xe(t,n):we(t,n)}function we(e,t){var n=t.parentNode;if(n)return n.insertAfter(e,t)}function xe(e,t){var n=t.parentNode;if(n){for(var r,o=e.start,i=[o];o&&o!==e.end;)o=o.nextSibling,i.push(o);var a=t;return i.every(function(e){return r=n.insertAfter(e,a),a=e,-1!==r}),r}}function Ee(e,t,n){void 0===n&&(n=!1),t.element?Se(t,n):Oe(t),t._vm&&t._vm.$emit("hook:destroyed")}function Oe(e){var t=e.parentNode;t&&t.removeChild(e)}function Se(e,t){void 0===t&&(t=!1);for(var n=[],r=e.start.nextSibling;r&&r!==e.end;)n.push(r),r=r.nextSibling;t||Oe(e.start),n.forEach(function(e){Oe(e)}),t||Oe(e.end)}function Ce(e){var t=e._options||{},n=t.template||{};t.replace?n.children&&1===n.children.length?ke(e,n.children[0],e._parentEl):ke(e,n.children,e._parentEl):ke(e,n,e._parentEl),console.debug('[JS Framework] "ready" lifecycle in Vm('+e._type+")"),e.$emit("hook:ready"),e._r
 eady=!0}function ke(e,t,n,r){if(-1!==(e._app||{}).lastSignal){if(t.attr&&t.attr.hasOwnProperty("static")&&(e._static=!0),je(t))return void Me(e,t,n,r);if(r=r||{},Ae(t))return console.debug('[JS Framework] compile "content" block by',t),void(e._content=ye(e,n));if(Ie(t,r))return console.debug('[JS Framework] compile "repeat" logic by',t),void("document"===n.type?console.warn("[JS Framework] The root element does't support `repeat` directive!"):$e(e,t,n));if(Te(t,r))return console.debug('[JS Framework] compile "if" logic by',t),void("document"===n.type?console.warn("[JS Framework] The root element does't support `if` directive!"):Re(e,t,n,r));var o=r.type||t.type;if(Ne(o,r))return void De(e,t,n,o,r);var i=o,a=Pe(e,t,i);if(a)return console.debug("[JS Framework] compile composed component by",t),void Fe(e,a,t,n,i,r);console.debug("[JS Framework] compile native component by",t),Le(e,t,n,i)}}function je(e){return Array.isArray(e)}function Ae(e){return"content"===e.type||"slot"===e.type}fu
 nction Ie(e,t){return!t.hasOwnProperty("repeat")&&e.repeat}function Te(e,t){return!t.hasOwnProperty("shown")&&e.shown}function Ne(e,t){return"function"==typeof e&&!t.hasOwnProperty("type")}function Pe(e,t,n){var r;return e._app&&e._app.customComponentMap&&(r=e._app.customComponentMap[n]),e._options&&e._options.components&&(r=e._options.components[n]),t.component&&(r=r||{}),r}function Me(e,t,n,r){var o=ye(e,n);t.forEach(function(t){ke(e,t,o,r)})}function $e(e,t,n){var r=t.repeat,o="function"==typeof r,i=r.getter||r.expression||r;"function"!=typeof i&&(i=function(){return[]});var a=r.key||"$index",s=r.value||"$value",u=r.trackBy||t.trackBy||t.attr&&t.attr.trackBy,c=ye(e,n);c.children=[],c.data=[],c.vms=[],Ue(e,t,c,{getter:i,key:a,value:s,trackBy:u,oldStyle:o})}function Re(e,t,n,r){var o={shown:!0},i=ye(e,n);n.element&&n.children&&n.children.push(i),r.repeat&&(o.repeat=r.repeat),Ve(e,t,i,o)}function De(e,t,n,r,o){var i=r.call(e),a=_({type:i},o),s=ye(e,n);n.element&&n.children&&n.childr
 en.push(s),de(e,r,function(n){var r=_({type:n},o);Ee(e,s,!0),ke(e,t,s,r)}),ke(e,t,s,a)}function Fe(e,t,n,r,o,i){var a=e.constructor,s=new a(o,t,e,r,void 0,{"hook:init":function(){e._static&&(this._static=e._static),oe(e,null,n.id,this),this._externalBinding={parent:e,template:n}},"hook:created":function(){Y(e,this,n,i.repeat)},"hook:ready":function(){this._content&&We(e,n,this._content)}});ee(e,s,n,r)}function Le(e,t,n,r){Z(t);var o;if("_documentElement"===n.ref?(console.debug("[JS Framework] compile to create body for "+r),o=he(e,r)):(console.debug("[JS Framework] compile to create element for "+r),o=ve(e,r)),!e._rootEl){e._rootEl=o;var i=e._externalBinding||{},a=i.template,s=i.parent;if(a&&a.events&&s&&o)for(var u in a.events){var c=s[a.events[u]];c&&o.addEvent(u,x(c,s))}}Q(e,o,t),t.attr&&t.attr.append&&(t.append=t.attr.append),t.append&&(o.attr=o.attr||{},o.attr.append=t.append);var l="tree"===t.append,f=e._app||{};-1===f.lastSignal||l||(console.debug("[JS Framework] compile to a
 ppend single node for",o),f.lastSignal=ge(e,o,n)),-1!==f.lastSignal&&We(e,t,o),-1!==f.lastSignal&&l&&(console.debug("[JS Framework] compile to append whole tree for",o),f.lastSignal=ge(e,o,n))}function We(e,t,n){var r=e._app||{},o=t.children;o&&o.length&&o.every(function(t){return ke(e,t,n),-1!==r.lastSignal})}function Ue(e,t,n,r){function o(e,r,o){var a;c?(a=e,E(e)?(a[l]=r,a.hasOwnProperty("INDEX")||Object.defineProperty(a,"INDEX",{value:function(){console.warn('[JS Framework] "INDEX" in repeat is deprecated, please use "$index" instead')}})):(console.warn("[JS Framework] Each list item must be an object in old-style repeat, please use `repeat={{v in list}}` instead."),a={},a[l]=r,a[f]=e)):(a={},a[l]=r,a[f]=e);var s=qe(o,a);i.push(s),ke(s,t,n,{repeat:e})}var i=n.vms,a=n.children,s=r.getter,u=r.trackBy,c=r.oldStyle,l=r.key,f=r.value,p=Be(e,n,s,"repeat",function(t){if(console.debug('[JS Framework] the "repeat" item has changed',t),n&&t){var r=a.slice(),s=i.slice(),p=n.data.slice(),d=
 {},h={};t.forEach(function(e,t){var n=u?e[u]:c?e[l]:t;null!=n&&""!==n&&(d[n]=e)});var v=[];p.forEach(function(t,n){var o=u?t[u]:c?t[l]:n;d.hasOwnProperty(o)?(h[o]={item:t,index:n,key:o,target:r[n],vm:s[n]},v.push(t)):Ee(e,r[n])}),a.length=0,i.length=0,n.data=t.slice(),n.updateMark=n.start,t.forEach(function(t,r){var s=u?t[u]:c?t[l]:r,p=h[s];p?(p.item===v[0]?v.shift():(v.$remove(p.item),be(e,p.target,n.updateMark,!0)),a.push(p.target),i.push(p.vm),c?p.vm=t:p.vm[f]=t,p.vm[l]=r,n.updateMark=p.target):o(t,r,e)}),delete n.updateMark}});n.data=p.slice(0),p.forEach(function(t,n){o(t,n,e)})}function Ve(e,t,n,r){var o=Be(e,n,t.shown,"shown",function(o){console.debug('[JS Framework] the "if" item was changed',o),n&&!!n.display!=!!o&&(n.display=!!o,o?ke(e,t,n,r):Ee(e,n,!0))});n.display=!!o,o&&ke(e,t,n,r)}function Be(e,t,n,r,o){var i=e&&e._app&&e._app.differ,a={},s=(t.element.depth||0)+1;return de(e,n,function(e){a.latestValue=e,i&&!a.recorded&&i.append(r,s,t.blockId,function(){var e=a.latestVa
 lue;o(e),a.recorded=!1,a.latestValue=void 0}),a.recorded=!0})}function qe(e,t){var n=Object.create(e);return n._data=t,J(n),G(n),n._realParent=e,e._static&&(n._static=e._static),n}function ze(e,t){if(t instanceof ze)return t;this.timestamp=Date.now(),this.detail=t,this.type=e;var n=!1;this.stop=function(){n=!0},this.hasStopped=function(){return n}}function Je(e,t){var n=this,r=this._vmEvents,o=r[e];if(o){var i=new ze(e,t);o.forEach(function(e){e.call(n,i)})}}function He(e,t){var n=new ze(e,t);this.$emit(e,n),!n.hasStopped()&&this._parent&&this._parent.$dispatch&&this._parent.$dispatch(e,n)}function Ge(e,t){var n=new ze(e,t);this.$emit(e,n),!n.hasStopped()&&this._childrenVms&&this._childrenVms.forEach(function(t){t.$broadcast(e,n)})}function Xe(e,t){if(e&&"function"==typeof t){var n=this._vmEvents,r=n[e]||[];r.push(t),n[e]=r,"hook:ready"===e&&this._ready&&this.$emit("hook:ready")}}function Ke(e,t){if(e){var n=this._vmEvents;if(!t)return void delete n[e];var r=n[e];r&&r.$remove(t)}}fu
 nction Ze(e,t){var n=e._options||{},r=n.events||{};for(var o in r)e.$on(o,r[o]);for(var i in t)e.$on(i,t[i]);$r.forEach(function(t){e.$on("hook:"+t,n[t])})}function Qe(e,t,n,r,o,i){n=n||{},this._parent=n._realParent?n._realParent:n,this._app=n._app||{},n._childrenVms&&n._childrenVms.push(this),!t&&this._app.customComponentMap&&(t=this._app.customComponentMap[e]),t=t||{};var a=t.data||{};this._options=t,this._methods=t.methods||{},this._computed=t.computed||{},this._css=t.style||{},this._ids={},this._vmEvents={},this._childrenVms=[],this._type=e,Ze(this,i),console.debug('[JS Framework] "init" lifecycle in Vm('+this._type+")"),this.$emit("hook:init"),this._inited=!0,this._data="function"==typeof a?a():a,o&&_(this._data,o),z(this),console.debug('[JS Framework] "created" lifecycle in Vm('+this._type+")"),this.$emit("hook:created"),this._created=!0,t.methods&&t.methods.ready&&(console.warn('"exports.methods.ready" is deprecated, please use "exports.created" instead'),t.methods.ready.call
 (this)),this._app.doc&&(this._parentEl=r||this._app.doc.documentElement,Ce(this))}function Ye(e,t){for(var n in e)!function(n){var r=Rr[n];r||(r={},Rr[n]=r),e[n].forEach(function(e){"string"==typeof e&&(e={name:e}),r[e.name]&&!t||(r[e.name]=e)})}(n)}function et(e,t){var n=e.prototype;for(var r in t)n.hasOwnProperty(r)||(n[r]=t[r])}function tt(e,t){var n=Rr[t],r={};for(var o in n)!function(n){Object.defineProperty(r,n,{configurable:!0,enumerable:!0,get:function(){return function(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return e.callTasks({module:t,method:n,args:r})}},set:function(r){if("function"==typeof r)return e.callTasks({module:t,method:n,args:[r]})}})}(o);return r}function nt(e,t){return e.customComponentMap[t]}function rt(e,t,n){var r=e.customComponentMap;if(r[t])return void console.error("[JS Framework] define a component("+t+") that already exists");r[t]=n}function ot(e){if(Dr.valid(e))return e;e="string"==typeof e?e:"";for(var t=e.split("."),n=0,r=[];n<3;){v
 ar o="string"==typeof t[n]&&t[n]?t[n]:"0";r.push(o),n++}return r.join(".")}function it(e,t,n){var r={isDowngrade:!0,errorType:1,code:1e3},o=e.toLowerCase();return r.errorMessage=function(e,t,n){return"Downgrade["+e+"] :: deviceInfo "+t+" matched criteria "+n}(e,t,n),o.indexOf("osversion")>=0?r.code=1001:o.indexOf("appversion")>=0?r.code=1002:o.indexOf("weexversion")>=0?r.code=1003:o.indexOf("devicemodel")>=0&&(r.code=1004),r}function at(e,t){t=t||global.WXEnvironment,t=O(t)?t:{};var n={isDowngrade:!1};if("function"===k(e)){var r=e.call(this,t,{semver:Dr,normalizeVersion:ot});r=!!r,n=r?it("custom","","custom params"):n}else{e=O(e)?e:{};var o=t.platform||"unknow",i=o.toLowerCase(),a=e[i]||{};for(var s in t){var u=s,c=u.toLowerCase(),l=t[s],f=c.indexOf("version")>=0,p=c.indexOf("devicemodel")>=0,d=a[s];if(d&&f){var h=ot(d),v=ot(t[s]);if(Dr.satisfies(v,h)){n=it(u,l,d);break}}else if(p){var y="array"===k(d)?d:[d];if(y.indexOf(l)>=0){n=it(u,l,d);break}}}}return n}function st(e,t){if(void 
 0===t&&(t={}),e&&e.callTasks)return e.callTasks([{module:"meta",method:"setViewport",args:[t]}])}function ut(e,t,n,r){console.debug("[JS Framework] bootstrap for "+t);var o;if(gr(t))o=j(t);else{if(!xr(t))return new Error("Wrong component name: "+t);if(o=A(t),!nt(e,o))return new Error("It's not a component: "+t)}if(n=O(n)?n:{},"string"==typeof n.transformerVersion&&"string"==typeof global.transformerVersion&&!Dr.satisfies(n.transformerVersion,global.transformerVersion))return new Error("JS Bundle version: "+n.transformerVersion+" not compatible with "+global.transformerVersion);var i=at(n.downgrade);if(i.isDowngrade)return e.callTasks([{module:"instanceWrap",method:"error",args:[i.errorType,i.code,i.errorMessage]}]),new Error("Downgrade["+i.code+"]: "+i.errorMessage);n.viewport&&st(e,n.viewport),e.vm=new Qe(o,null,{_app:e},null,r)}function ct(e,t,n){console.warn("[JS Framework] Register is deprecated, please install lastest transformer."),rt(e,t,n)}function lt(e,t){console.debug("[JS
  Framework] Refresh with",t,"in instance["+e.id+"]");var n=e.vm;return n&&t?("function"==typeof n.refreshData?n.refreshData(t):_(n,t),e.differ.flush(),void e.doc.taskCenter.send("dom",{action:"refreshFinish"},[])):new Error('invalid data "'+t+'"')}function ft(e){console.debug("[JS Framework] Destory an instance("+e.id+")"),e.vm&&pt(e.vm),e.id="",e.options=null,e.blocks=null,e.vm=null,e.doc.taskCenter.destroyCallback(),e.doc.destroy(),e.doc=null,e.customComponentMap=null,e.commonModules=null}function pt(e){if(delete e._app,delete e._computed,delete e._css,delete e._data,delete e._ids,delete e._methods,delete e._options,delete e._parent,delete e._parentEl,delete e._rootEl,e._watchers){for(var t=e._watchers.length;t--;)e._watchers[t].teardown();delete e._watchers}if(e._childrenVms){for(var n=e._childrenVms.length;n--;)pt(e._childrenVms[n]);delete e._childrenVms}console.debug('[JS Framework] "destroyed" lifecycle in Vm('+e._type+")"),e.$emit("hook:destroyed"),delete e._type,delete e._vm
 Events}function dt(e){var t=e.doc||{},n=t.body||{};return n.toJSON?n.toJSON():{}}function ht(e,t,n,r,o){if(console.debug('[JS Framework] Fire a "'+n+'" event on an element('+t+") in instance("+e.id+")"),Array.isArray(t))return void t.some(function(t){return!1!==ht(e,t,n,r)});var i=e.doc.getRef(t);if(i){var a=e.doc.fireEvent(i,n,r,o);return e.differ.flush(),e.doc.taskCenter.send("dom",{action:"updateFinish"},[]),a}return new Error('invalid element reference "'+t+'"')}function vt(e,t,n,r){console.debug("[JS Framework] Invoke a callback("+t+") with",n,"in instance("+e.id+")");var o=e.doc.taskCenter.callback(t,n,r);return yt(e),e.doc.taskCenter.send("dom",{action:"updateFinish"},[]),o}function yt(e){e.differ.flush()}function mt(e,t){var n;return"array"!==k(t)&&(t=[t]),t.forEach(function(t){n=e.doc.taskCenter.send("module",{module:t.module,method:t.method},t.args)}),n}function _t(e,t,n,r){console.debug("[JS Framework] Intialize an instance with:\n",n);var o,i=function(){for(var t=[],n=ar
 guments.length;n--;)t[n]=arguments[n];return Fr.apply(void 0,[e].concat(t))},a=function(t,r,i){o=ut(e,t,r,i||n),yt(e),e.doc.listener.createFinish(),console.debug("[JS Framework] After intialized an instance("+e.id+")")},s=Qe,u=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return ct.apply(void 0,[e].concat(t))},c=function(t,n){o=ut(e,t,{},n)},l=function(t){return function(n){o=ut(e,t,{},n)}},f=e.doc,p=function(t){return e.requireModule(j(t))},d={config:e.options,define:i,bootstrap:a,requireModule:p,document:f,Vm:s};Object.freeze(d);var h;"function"==typeof t?h=t.toString().substr(12):t&&(h=t.toString()),h='(function(global){\n\n"use strict";\n\n '+h+" \n\n})(Object.create(this))";var v=global.WXEnvironment,y={};if(v&&"Web"!==v.platform){var m=e.requireModule("timer");Object.assign(y,{setTimeout:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=function(){t[0].apply(t,t.slice(2))};return m.setTimeout(r,t[1]),e.doc.taskCenter.callbackManager.la
 stCallbackId.toString()},setInterval:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=function(){t[0].apply(t,t.slice(2))};return m.setInterval(r,t[1]),e.doc.taskCenter.callbackManager.lastCallbackId.toString()},clearTimeout:function(e){m.clearTimeout(e)},clearInterval:function(e){m.clearInterval(e)}})}var _=Object.assign({define:i,require:l,bootstrap:a,register:u,render:c,__weex_define__:i,__weex_bootstrap__:a,__weex_document__:f,__weex_require__:p,__weex_viewmodel__:s,weex:d},y,r);return bt(_,h)||gt(_,h),o}function gt(e,t){var n=[],r=[];for(var o in e)n.push(o),r.push(e[o]);return n.push(t),(new(Function.prototype.bind.apply(Function,[null].concat(n)))).apply(void 0,r)}function bt(e,t){if("function"!=typeof compileAndRunBundle)return!1;var n=void 0,r=!1,o="(function (",i=[],a=[];for(var s in e)i.push(s),a.push(e[s]);for(var u=0;u<i.length-1;++u)o+=i[u],o+=",";o+=i[i.length-1],o+=") {",o+=t,o+="} )";try{var c=e.weex||{},l=c.config||{};n=compileAndRunBundle(o,
 l.bundleUrl,l.bundleDigest,l.codeCachePath),n&&"function"==typeof n&&(n.apply(void 0,a),r=!0)}catch(e){console.error(e)}return r}function wt(e,t){var n=e[t];for(var r in n)n[r]()}function xt(e,t){var n=e[t];for(var r in n){n[r].forEach(function(e){e()})}}function Et(e,t){this.id=e,this.options=t||{},this.vm=null,this.customComponentMap={},this.commonModules={},this.doc=new Tr.Document(e,this.options.bundleUrl,null,Tr.Listener),this.differ=new Lr(e)}function Ot(e,t,n,r,o){var i=o||{},a=i.services;P();var s=Wr[e];n=n||{};var u;return s?u=new Error('invalid instance id "'+e+'"'):(s=new Et(e,n),Wr[e]=s,u=_t(s,t,r,a)),u instanceof Error?u:s}function St(e){Tr.Document=e.Document,Tr.Element=e.Element,Tr.Comment=e.Comment,Tr.sendTasks=e.sendTasks,Tr.Listener=e.Listener}function Ct(e,t){var n=Wr[e];return n?lt(n,t):new Error('invalid instance id "'+e+'"')}function kt(e){"function"==typeof markupState&&markupState(),P();var t=Wr[e];if(!t)return new Error('invalid instance id "'+e+'"');ft(t),d
 elete Wr[e];var n=Math.round(e);if(n>0){n%18||"function"!=typeof notifyTrimMemory||notifyTrimMemory()}return Wr}function jt(e){Array.isArray(e)&&e.forEach(function(e){e&&("string"==typeof e?Ur[e]=!0:"object"==typeof e&&"string"==typeof e.type&&(Ur[e.type]=e))})}function At(e){"object"==typeof e&&Ye(e)}function It(e){"object"==typeof e&&et(Qe,e)}function Tt(e,t){if(Wr[e]&&Array.isArray(t)){var n=[];return t.forEach(function(t){var r=Vr[t.method],o=[].concat(t.args);"function"==typeof r&&(o.unshift(e),n.push(r.apply(void 0,o)))}),n}return new Error('invalid instance id "'+e+'" or tasks')}function Nt(e){var t=Wr[e];return t?dt(t):new Error('invalid instance id "'+e+'"')}function Pt(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=qs(t),this.reject=qs(n)}function Mt(){if(Rt(),global.WXEnvironment&&"Web"!==global.WXEnvironment.platform)global.console={debug:function(){for(var e=[],t=arguments.length;t-
 -;)e[t]=arguments[t];Dt("debug")&&global.nativeLog.apply(global,Ft(e).concat(["__DEBUG"]))},log:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("log")&&global.nativeLog.apply(global,Ft(e).concat(["__LOG"]))},info:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("info")&&global.nativeLog.apply(global,Ft(e).concat(["__INFO"]))},warn:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("warn")&&global.nativeLog.apply(global,Ft(e).concat(["__WARN"]))},error:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("error")&&global.nativeLog.apply(global,Ft(e).concat(["__ERROR"]))}};else{var e=console.debug,t=console.log,n=console.info,r=console.warn,o=console.error;console.__ori__={debug:e,log:t,info:n,warn:r,error:o},console.debug=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("debug")&&console.__ori__.debug.apply(console,e)},console.log=function(){for(var e=[],t=arguments.length;t--;)e[t]=argumen
 ts[t];Dt("log")&&console.__ori__.log.apply(console,e)},console.info=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("info")&&console.__ori__.info.apply(console,e)},console.warn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("warn")&&console.__ori__.warn.apply(console,e)},console.error=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];Dt("error")&&console.__ori__.error.apply(console,e)}}}function $t(){Lu={},global.console=Wu}function Rt(){Fu.forEach(function(e){var t=Fu.indexOf(e);Lu[e]={},Fu.forEach(function(n){Fu.indexOf(n)<=t&&(Lu[e][n]=!0)})})}function Dt(e){var t=global.WXEnvironment&&global.WXEnvironment.logLevel||"log";return Lu[t]&&Lu[t][e]}function Ft(e){return e.map(function(e){return e="[object object]"===Object.prototype.toString.call(e).toLowerCase()?JSON.stringify(e):String(e)})}function Lt(){if(void 0===setTimeout&&"function"==typeof Vu){var e={},t=0;global.setTimeout=function(n,r){e[++t]=n,Vu(t.toString(),r)},
 global.setTimeoutCallback=function(t){"function"==typeof e[t]&&(e[t](),delete e[t])}}}function Wt(){global.setTimeout=Uu,global.setTimeoutCallback=null}function Ut(){Object.freeze(Object),Object.freeze(Array),Vt(),Object.freeze(Array.prototype),Object.freeze(String.prototype),Object.freeze(Number.prototype),Object.freeze(Boolean.prototype),Bt(),Object.freeze(Date.prototype),Object.freeze(RegExp.prototype)}function Vt(){var e=Object.prototype,t="Object.prototype";qt(e,"__defineGetter__",t),qt(e,"__defineSetter__",t),qt(e,"__lookupGetter__",t),qt(e,"__lookupSetter__",t),qt(e,"constructor",t),qt(e,"hasOwnProperty",t),qt(e,"isPrototypeOf",t),qt(e,"propertyIsEnumerable",t),qt(e,"toLocaleString",t),qt(e,"toString",t),qt(e,"valueOf",t),Object.seal(e)}function Bt(){var e=Error.prototype,t="Error.prototype";qt(e,"name",t),qt(e,"message",t),qt(e,"toString",t),qt(e,"constructor",t),Object.seal(e)}function qt(e,t,n){if(e.hasOwnProperty(t)){var r=e[t];Object.defineProperty(e,t,{get:function(){re
 turn r},set:function(r){if(this===e)throw Error("Cannot assign to read only property "+t+" of "+n);return Object.defineProperty(this,t,{value:r,writable:!0}),r}})}}function zt(){return(Bu++).toString()}function Jt(e){var t=Object.prototype.toString.call(e);return t.substring(8,t.length-1)}function Ht(e){if("function"!=typeof btoa)return"";var t=Array.prototype.map.call(new Uint8Array(e),function(e){return String.fromCharCode(e)}).join("");return btoa(t)}function Gt(e){if("function"!=typeof atob)return new ArrayBuffer(0);var t=atob(e),n=new Uint8Array(t.length);return Array.prototype.forEach.call(t,function(e,t){n[t]=e.charCodeAt(0)}),n.buffer}function Xt(e){var t=Jt(e);switch(t){case"Undefined":case"Null":return"";case"RegExp":return e.toString();case"Date":return e.toISOString();case"Number":case"String":case"Boolean":case"Array":case"Object":return e;case"ArrayBuffer":return{"@type":"binary",dataType:t,base64:Ht(e)};case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int
 16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":
-case"Float64Array":return{"@type":"binary",dataType:t,base64:Ht(e.buffer)};default:return JSON.stringify(e)}}function Kt(e){if("Object"===Jt(e)){if(e["@type"]&&"binary"===e["@type"])return Gt(e.base64||"");var t={};for(var n in e)t[n]=Kt(e[n]);return t}return"Array"===Jt(e)?e.map(Kt):e}function Zt(e,t){e&&(zu[e]=t)}function Qt(e){return zu[e]}function Yt(e){delete zu[e]}function en(e){var t=zu[e];return t&&t.taskCenter?t.taskCenter:null}function tn(e,t,n){var r=e.documentElement;if(!(r.pureChildren.length>0||t.parentNode)){var o=r.children,i=o.indexOf(n);i<0?o.push(t):o.splice(i,0,t),1===t.nodeType?("body"===t.role?(t.docId=e.id,t.ownerDocument=e,t.parentNode=r,on(t,r)):(t.children.forEach(function(e){e.parentNode=t}),rn(e,t),t.docId=e.id,t.ownerDocument=e,on(t,r),delete e.nodeMap[t.nodeId]),r.pureChildren.push(t),nn(e,t)):(t.parentNode=r,e.nodeMap[t.ref]=t)}}function nn(e,t){var n=t.toJSON(),r=n.children;delete n.children;var o=e.taskCenter.send("dom",{action:"createBody"},[n]);ret
 urn r&&r.forEach(function(t){o=e.taskCenter.send("dom",{action:"addElement"},[n.ref,t,-1])}),o}function rn(e,t){t.role="body",t.depth=1,delete e.nodeMap[t.nodeId],t.ref="_root",e.nodeMap._root=t,e.body=t}function on(e,t){e.parentNode=t,t.docId&&(e.docId=t.docId,e.ownerDocument=t.ownerDocument,e.ownerDocument.nodeMap[e.nodeId]=e,e.depth=t.depth+1),e.children.forEach(function(t){on(t,e)})}function an(e){for(;e;){if(1===e.nodeType)return e;e=e.nextSibling}}function sn(e){for(;e;){if(1===e.nodeType)return e;e=e.previousSibling}}function un(e,t,n,r){n<0&&(n=0);var o=t[n-1],i=t[n];return t.splice(n,0,e),r&&(o&&(o.nextSibling=e),e.previousSibling=o,e.nextSibling=i,i&&(i.previousSibling=e)),n}function cn(e,t,n,r){var o=t.indexOf(e);if(o<0)return-1;if(r){var i=t[o-1],a=t[o+1];i&&(i.nextSibling=a),a&&(a.previousSibling=i)}t.splice(o,1);var s=n;o<=n&&(s=n-1);var u=t[s-1],c=t[s];return t.splice(s,0,e),r&&(u&&(u.nextSibling=e),e.previousSibling=u,e.nextSibling=c,c&&(c.previousSibling=e)),o===s?-
 1:n}function ln(e,t,n){var r=t.indexOf(e);if(!(r<0)){if(n){var o=t[r-1],i=t[r+1];o&&(o.nextSibling=i),i&&(i.previousSibling=o)}t.splice(r,1)}}function fn(e,t){if(t&&t.length){var n=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Hu);t.forEach(function(t){n.prototype[t]=function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o=en(this.docId);if(o)return o.send("component",{ref:this.ref,component:e,method:t},n)}}),Gu[e]=n}}function pn(e){return Gu[e]}function dn(e,t){Qt(e).nodeMap[t.nodeId]=t}function hn(){var e={createFinish:global.callCreateFinish,updateFinish:global.callUpdateFinish,refreshFinish:global.callRefreshFinish,createBody:global.callCreateBody,addElement:global.callAddElement,removeElement:global.callRemoveElement,moveElement:global.callMoveElement,updateAttrs:global.callUpdateAttrs,updateStyle:global.callUpdateStyle,addEvent:global.callAddEvent,removeEvent:glob
 al.callRemoveEvent},t=Yu.prototype;for(var n in e)!function(n){var r=e[n];t[n]=r?function(e,t){return r.apply(void 0,[e].concat(t))}:function(e,t){return Qu(e,[{module:"dom",method:n,args:t}],"-1")}}(n);t.componentHandler=global.callNativeComponent||function(e,t,n,r,o){return Qu(e,[{component:o.component,ref:t,method:n,args:r}])},t.moduleHandler=global.callNativeModule||function(e,t,n,r){return Qu(e,[{module:t,method:n,args:r}])}}function vn(e,t){mn(e)?console.warn('Service "'+e+'" has been registered already!'):(t=Object.assign({},t),nc.push({name:e,options:t}))}function yn(e){nc.some(function(t,n){if(t.name===e)return nc.splice(n,1),!0})}function mn(e){return _n(e)>=0}function _n(e){return nc.map(function(e){return e.name}).indexOf(e)}function gn(e){var t=rc.exec(e);if(t)try{return JSON.parse(t[1]).framework}catch(e){}return"Weex"}function bn(e,t,n){var r=Object.create(null);return r.service=Object.create(null),nc.forEach(function(o){var i=(o.name,o.options),a=i.create;if(a){var s
 =a(e,t,n);Object.assign(r.service,s),Object.assign(r,s.instance)}}),delete r.service.instance,Object.freeze(r.service),r}function wn(e){if(oc[e])return oc[e].framework}function xn(e,t,n,r){if(oc[e])return new Error('invalid instance id "'+e+'"');var o=gn(t);n=JSON.parse(JSON.stringify(n||{})),n.env=JSON.parse(JSON.stringify(global.WXEnvironment||{}));var i={config:n,created:Date.now(),framework:o};i.services=bn(e,i,tc),oc[e]=i;var a=ec[o];return a?a.createInstance(e,t,n,r,i):new Error('invalid bundle type "'+o+'".')}function En(e){ic[e]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];"registerComponents"===e&&On(t[0]);for(var r in ec){var o=ec[r];o&&o[e]&&o[e].apply(o,t)}}}function On(e){Array.isArray(e)&&e.forEach(function(e){e&&e.type&&e.methods&&fn(e.type,e.methods)})}function Sn(e){ic[e]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=t[0],o=wn(r);if(o&&ec[o]){var i=(s=ec[o])[e].apply(s,t),a={framework:o};return"refreshInstance"===e?nc.f
 orEach(function(e){var t=e.options.refresh;t&&t(r,{info:a,runtime:tc})}):"destroyInstance"===e&&(nc.forEach(function(e){var t=e.options.destroy;t&&t(r,{info:a,runtime:tc})}),delete oc[r]),i}return new Error('invalid instance id "'+r+'"');var s}}function Cn(e,t){ic[t]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var r=t[0],o=wn(r);return o&&ec[o]?(i=ec[o])[e].apply(i,t):new Error('invalid instance id "'+r+'"');var i}}function kn(e){tc=e||{},ec=tc.frameworks||{},hn();for(var t in ec){ec[t].init(e)}return["registerComponents","registerModules","registerMethods"].forEach(En),["destroyInstance","refreshInstance","receiveTasks","getRoot"].forEach(Sn),Cn("receiveTasks","callJS"),ic}function jn(e,t){return void 0===t&&(t=[]),{module:"dom",method:e,args:t}}function An(e,t){var n=t||global.callNative;return"function"!=typeof n&&console.error("[JS Runtime] no default handler"),function(t){Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var o=Tn(e,t[r],n);if(-1===o)re
 turn o}}}function In(e,t){return"dom"===e&&uc[t]&&"function"==typeof global[uc[t]]}function Tn(e,t,n){var r=t.module,o=t.method,i=t.args;return In(r,o)?global[uc[o]].apply(global,[e].concat(i,["-1"])):n(e,[t],"-1")}function Nn(e,t){var n=t.attrs||{};for(var r in n)e.setAttr(r,n[r],!0);var o=t.style||{};for(var i in o)e.setStyle(i,o[i],!0)}function Pn(){Ut(),Object.freeze(lc.Comment),Object.freeze(lc.Listener),Object.freeze(lc.Document.prototype),Object.freeze(lc.Comment.prototype),Object.freeze(lc.Listener.prototype)}function Mn(e,t){void 0===t&&(t={}),this.type=e||"message",this.data=t.data||null,this.origin=t.origin||"",this.source=t.source||null,this.ports=t.ports||[],this.target=null,this.timeStamp=Date.now()}function $n(){}function Rn(e,t,n,r){console.warn("[Upgrade Warning] $userTrack will be removed in the next version!"),console.warn("[JS Framework] Vm#$userTrack is deprecated, please use \"require('@weex-module/userTrack').commit(type, name, comName, param)\" instead"),this
 ._app.requireModule("userTrack").commit(e,t,n,r)}function Dn(e,t){if(console.warn("[Upgrade Warning] $sendMtop will be removed in the next version!"),console.warn("[JS Framework] Vm#$sendMtop is deprecated, please use \"require('@weex-module/stream').sendMtop(params, callback)\" instead"),"undefined"==typeof window){this._app.requireModule("windvane").call({class:"MtopWVPlugin",method:"send",data:e},t)}else{this._app.requireModule("stream").sendMtop(e,t)}}function Fn(e,t){console.warn("[Upgrade Warning] $callWindvane will be removed in the next version!"),console.warn("[JS Framework] Vm#$callWindvane is deprecated, please use \"require('@weex-module/windvane').call(params, callback)\" instead"),this._app.requireModule("windvane").call(e,t)}function Ln(e,t){console.warn("[Upgrade Warning] $setSpm will be removed in the next version!"),console.warn("[JS Framework] Vm#$setSpm is deprecated, please use \"require('@weex-module/pageInfo').setSpm(a, b)\" instead"),this._app.requireModule("
 pageInfo").setSpm(e,t)}function Wn(e){console.warn("[Upgrade Warning] $getUserInfo will be removed in the next version!"),console.warn("[JS Framework] Vm#$getUserInfo is deprecated, please use \"require('@weex-module/user').getUserInfo(callback)\" instead"),this._app.requireModule("user").getUserInfo(e)}function Un(e){console.warn("[Upgrade Warning] $login will be removed in the next version!"),console.warn("[JS Framework] Vm#$login is deprecated, please use \"require('@weex-module/user').login(callback)\" instead"),this._app.requireModule("user").login(e)}function Vn(e){console.warn("[Upgrade Warning] $logout will be removed in the next version!"),console.warn("[JS Framework] Vm#$logout is deprecated, please use \"require('@weex-module/user').logout(callback)\" instead"),this._app.requireModule("user").logout(e)}var Bn,qn={},zn={},Jn=Object.freeze({init:e,createInstance:t,destroyInstance:n,getRoot:r,receiveTasks:o}),Hn="undefined"!=typeof window?window:void 0!==global?global:"undef
 ined"!=typeof self?self:{},Gn=a(function(e){e.exports=function(e,t){function n(e){return void 0===e||null===e}function r(e){return void 0!==e&&null!==e}function o(e){return!0===e}function i(e){return!1===e}function a(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Object]"===kn.call(e)}function c(e){return"[object RegExp]"===kn.call(e)}function l(e){var t=parseFloat(e);return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function p(e){var t=parseFloat(e);return isNaN(t)?e:t}function d(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function h(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function v(e,t){return An.call(e,t)}function y(e){var t=Object.create(null);return function(n){retu
 rn t[n]||(t[n]=e(n))}}function m(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function _(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function g(e,t){for(var n in t)e[n]=t[n];return e}function b(e){for(var t={},n=0;n<e.length;n++)e[n]&&g(t,e[n]);return t}function w(e,t,n){}function x(e,t){if(e===t)return!0;var n=s(e),r=s(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),i=Array.isArray(t);if(o&&i)return e.length===t.length&&e.every(function(e,n){return x(e,t[n])});if(o||i)return!1;var a=Object.keys(e),u=Object.keys(t);return a.length===u.length&&a.every(function(n){return x(e[n],t[n])})}catch(e){return!1}}function E(e,t){for(var n=0;n<e.length;n++)if(x(e[n],t))return n;return-1}function O(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function S(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function C(e,t,n,r){Object.definePr
 operty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function k(e){if(!Vn.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function j(e,t,n){if(Wn.errorHandler)Wn.errorHandler.call(null,e,t,n);else{if(!zn||"undefined"==typeof console)throw e;console.error(e)}}function A(e){return"function"==typeof e&&/native code/.test(e.toString())}function I(e){ar.target&&sr.push(ar.target),ar.target=e}function T(){ar.target=sr.pop()}function N(e,t,n){e.__proto__=t}function P(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];C(e,i,t[i])}}function M(e,t){if(s(e)){var n;return v(e,"__ob__")&&e.__ob__ instanceof pr?n=e.__ob__:fr.shouldConvert&&!tr()&&(Array.isArray(e)||u(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new pr(e)),t&&n&&n.vmCount++,n}}function $(e,t,n,r,o){var i=new ar,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,u=a&&a.set,c=!o&&M(n);Object.defineProperty(e,t,{enumerable:!0,configur
 able:!0,get:function(){var t=s?s.call(e):n;return ar.target&&(i.depend(),c&&c.dep.depend(),Array.isArray(t)&&F(t)),t},set:function(t){var r=s?s.call(e):n;t===r||t!==t&&r!==r||(u?u.call(e,t):n=t,c=!o&&M(t),i.notify())}})}}function R(e,t,n){if(Array.isArray(e)&&l(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(v(e,t))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?($(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function D(e,t){if(Array.isArray(e)&&l(t))return void e.splice(t,1);var n=e.__ob__;e._isVue||n&&n.vmCount||v(e,t)&&(delete e[t],n&&n.dep.notify())}function F(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&F(t)}function L(e,t){if(!t)return e;for(var n,r,o,i=Object.keys(t),a=0;a<i.length;a++)n=i[a],r=e[n],o=t[n],v(e,n)?u(r)&&u(o)&&L(r,o):R(e,n,o);return e}function W(e,t,n){return n?e||t?function(){var r="function"==typeof t?t.call(n):t,o="function"==typeof e?e.call(n):e;return r?L(r,o):o}:void 0:t?
 e?function(){return L("function"==typeof t?t.call(this):t,"function"==typeof e?e.call(this):e)}:t:e}function U(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function V(e,t){var n=Object.create(e||null);return t?g(n,t):n}function B(e){var t=e.props;if(t){var n,r,o,i={};if(Array.isArray(t))for(n=t.length;n--;)"string"==typeof(r=t[n])&&(o=Tn(r),i[o]={type:null});else if(u(t))for(var a in t)r=t[a],o=Tn(a),i[o]=u(r)?r:{type:r};e.props=i}}function q(e){var t=e.inject;if(Array.isArray(t))for(var n=e.inject={},r=0;r<t.length;r++)n[t[r]]=t[r]}function z(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function J(e,t,n){function r(r){var o=dr[r]||hr;u[r]=o(e[r],t[r],n,r)}"function"==typeof t&&(t=t.options),B(t),q(t),z(t);var o=t.extends;if(o&&(e=J(e,o,n)),t.mixins)for(var i=0,a=t.mixins.length;i<a;i++)e=J(e,t.mixins[i],n);var s,u={};for(s in e)r(s);for(s in t)v(e,s)||r(s);return u}function H(e,t,n,r){if("string"==typeof n){var o=e[t]
 ;if(v(o,n))return o[n];var i=Tn(n);if(v(o,i))return o[i];var a=Nn(i);if(v(o,a))return o[a];var s=o[n]||o[i]||o[a];return s}}function G(e,t,n,r){var o=t[e],i=!v(n,e),a=n[e];if(Z(Boolean,o.type)&&(i&&!v(o,"default")?a=!1:Z(String,o.type)||""!==a&&a!==Mn(e)||(a=!0)),void 0===a){a=X(r,o,e);var s=fr.shouldConvert;fr.shouldConvert=!0,M(a),fr.shouldConvert=s}return a}function X(e,t,n){if(v(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==K(t.type)?r.call(e):r}}function K(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Z(e,t){if(!Array.isArray(t))return K(t)===K(e);for(var n=0,r=t.length;n<r;n++)if(K(t[n])===K(e))return!0;return!1}function Q(e){return new vr(void 0,void 0,void 0,String(e))}function Y(e,t){var n=new vr(e.tag,e.data,e.children,e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return n.ns=e.ns,n.isStatic=e.isStatic,n.key=e.ke
 y,n.isComment=e.isComment,n.isCloned=!0,t&&e.children&&(n.children=ee(e.children)),n}function ee(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++)r[o]=Y(e[o],t);return r}function te(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),o=0;o<r.length;o++)r[o].apply(null,e)}return t.fns=e,t}function ne(e,t,r,o,i){var a,s,c,l,f;for(a in e)s=c=e[a],l=t[a],f=gr(a),u(s)&&(c=s.handler,f.params=s.params),n(c)||(n(l)?(n(c.fns)&&(c=e[a]=te(c)),r(f.name,c,f.once,f.capture,f.passive,f.params)):c!==l&&(l.fns=c,e[a]=l));for(a in t)n(e[a])&&(f=gr(a),o(f.name,t[a],f.capture))}function re(e,t,i){function a(){i.apply(this,arguments),h(s.fns,a)}var s,u=e[t];n(u)?s=te([a]):r(u.fns)&&o(u.merged)?(s=u,s.fns.push(a)):s=te([u,a]),s.merged=!0,e[t]=s}function oe(e,t,o){var i=t.options.props;if(!n(i)){var a={},s=e.attrs,u=e.props;if(r(s)||r(u))for(var c in i){var l=Mn(c);ie(a,u,c,l,!0)||ie(a,s,c,l,!1)}return a}}function ie(e,t,n,o,i){if(r(t)){if(v(t
 ,n))return e[n]=t[n],i||delete t[n],!0;if(v(t,o))return e[n]=t[o],i||delete t[o],!0}return!1}function ae(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function se(e){return a(e)?[Q(e)]:Array.isArray(e)?ce(e):void 0}function ue(e){return r(e)&&r(e.text)&&i(e.isComment)}function ce(e,t){var i,s,u,c=[];for(i=0;i<e.length;i++)s=e[i],n(s)||"boolean"==typeof s||(u=c[c.length-1],Array.isArray(s)?c.push.apply(c,ce(s,(t||"")+"_"+i)):a(s)?ue(u)?u.text+=String(s):""!==s&&c.push(Q(s)):ue(s)&&ue(u)?c[c.length-1]=Q(u.text+s.text):(o(e._isVList)&&r(s.tag)&&n(s.key)&&r(t)&&(s.key="__vlist"+t+"_"+i+"__"),c.push(s)));return c}function le(e,t){return e.__esModule&&e.default&&(e=e.default),s(e)?t.extend(e):e}function fe(e,t,n,r,o){var i=_r();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}function pe(e,t,i){if(o(e.error)&&r(e.errorComp))return e.errorComp;if(r(e.resolved))return e.resolved;if(o(e.loading)&&r(e.loadingCo
 mp))return e.loadingComp;if(!r(e.contexts)){var a=e.contexts=[i],u=!0,c=function(){for(var e=0,t=a.length;e<t;e++)a[e].$forceUpdate()},l=O(function(n){e.resolved=le(n,t),u||c()}),f=O(function(t){r(e.errorComp)&&(e.error=!0,c())}),p=e(l,f);return s(p)&&("function"==typeof p.then?n(e.resolved)&&p.then(l,f):r(p.component)&&"function"==typeof p.component.then&&(p.component.then(l,f),r(p.error)&&(e.errorComp=le(p.error,t)),r(p.loading)&&(e.loadingComp=le(p.loading,t),0===p.delay?e.loading=!0:setTimeout(function(){n(e.resolved)&&n(e.error)&&(e.loading=!0,c())},p.delay||200)),r(p.timeout)&&setTimeout(function(){n(e.resolved)&&f(null)},p.timeout))),u=!1,e.loading?e.loadingComp:e.resolved}e.contexts.push(i)}function de(e){return e.isComment&&e.asyncFactory}function he(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(r(n)&&(r(n.componentOptions)||de(n)))return n}}function ve(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&_e(e,t)}functi
 on ye(e,t,n){n?mr.$once(e,t):mr.$on(e,t)}function me(e,t){mr.$off(e,t)}function _e(e,t,n){mr=e,ne(t,n||{},ye,me,e)}function ge(e,t){var n={};if(!e)return n;for(var r=[],o=0,i=e.length;o<i;o++){var a=e[o];if(a.context!==t&&a.functionalContext!==t||!a.data||null==a.data.slot)r.push(a);else{var s=a.data.slot,u=n[s]||(n[s]=[]);"template"===a.tag?u.push.apply(u,a.children):u.push(a)}}return r.every(be)||(n.default=r),n}function be(e){return e.isComment||" "===e.text}function we(e,t){t=t||{};for(var n=0;n<e.length;n++)Array.isArray(e[n])?we(e[n],t):t[e[n].key]=e[n].fn;return t}function xe(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function Ee(e,t,n){e.$el=t,e.$options.render||(e.$options.render=_r),je(e,"beforeMount");var r;return r=function(){e._u
 pdate(e._render(),n)},e._watcher=new jr(e,r,w),n=!1,null==e.$vnode&&(e._isMounted=!0,je(e,"mounted")),e}function Oe(e,t,n,r,o){var i=!!(o||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==Un);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=o,e.$attrs=r.data&&r.data.attrs||Un,e.$listeners=n||Un,t&&e.$options.props){fr.shouldConvert=!1;for(var a=e._props,s=e.$options._propKeys||[],u=0;u<s.length;u++){var c=s[u];a[c]=G(c,e.$options.props,t,e)}fr.shouldConvert=!0,e.$options.propsData=t}if(n){var l=e.$options._parentListeners;e.$options._parentListeners=n,_e(e,n,l)}i&&(e.$slots=ge(o,r.context),e.$forceUpdate())}function Se(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function Ce(e,t){if(t){if(e._directInactive=!1,Se(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Ce(e.$children[n]);je(e,"activated")}}function ke(e,t){if(!(t&&(e.
 _directInactive=!0,Se(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)ke(e.$children[n]);je(e,"deactivated")}}function je(e,t){var n=e.$options[t];if(n)for(var r=0,o=n.length;r<o;r++)try{n[r].call(e)}catch(n){j(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t)}function Ae(){Cr=wr.length=xr.length=0,Er={},Or=Sr=!1}function Ie(){Sr=!0;var e,t;for(wr.sort(function(e,t){return e.id-t.id}),Cr=0;Cr<wr.length;Cr++)e=wr[Cr],t=e.id,Er[t]=null,e.run();var n=xr.slice(),r=wr.slice();Ae(),Pe(n),Te(r),nr&&Wn.devtools&&nr.emit("flush")}function Te(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&je(r,"updated")}}function Ne(e){e._inactive=!1,xr.push(e)}function Pe(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Ce(e[t],!0)}function Me(e){var t=e.id;if(null==Er[t]){if(Er[t]=!0,Sr){for(var n=wr.length-1;n>Cr&&wr[n].id>e.id;)n--;wr.splice(n+1,0,e)}else wr.push(e);Or||(Or=!0,or(Ie))}}function $e(e){Ar.clear(),Re(e,Ar)}function Re(e,t){var n,r,o=Array.
 isArray(e);if((o||s(e))&&Object.isExtensible(e)){if(e.__ob__){var i=e.__ob__.dep.id;if(t.has(i))return;t.add(i)}if(o)for(n=e.length;n--;)Re(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)Re(e[r[n]],t)}}function De(e,t,n){Ir.get=function(){return this[t][n]},Ir.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Ir)}function Fe(e){e._watchers=[];var t=e.$options;t.props&&Le(e,t.props),t.methods&&ze(e,t.methods),t.data?We(e):M(e._data={},!0),t.computed&&Ve(e,t.computed),t.watch&&t.watch!==Kn&&Je(e,t.watch)}function Le(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[],i=!e.$parent;fr.shouldConvert=i;for(var a in t)!function(i){o.push(i);var a=G(i,t,n,e);$(r,i,a),i in e||De(e,"_props",i)}(a);fr.shouldConvert=!0}function We(e){var t=e.$options.data;t=e._data="function"==typeof t?Ue(t,e):t||{},u(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,o=(e.$options.methods,n.length);o--;){var i=n[o];r&&v(r,i)||S(i)||De(e,"_data",i)}M(t,!0)}function Ue(e,t){t
 ry{return e.call(t)}catch(e){return j(e,t,"data()"),{}}}function Ve(e,t){var n=e._computedWatchers=Object.create(null),r=tr();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;r||(n[o]=new jr(e,a||w,w,Tr)),o in e||Be(e,o,i)}}function Be(e,t,n){var r=!tr();"function"==typeof n?(Ir.get=r?qe(t):n,Ir.set=w):(Ir.get=n.get?r&&!1!==n.cache?qe(t):n.get:w,Ir.set=n.set?n.set:w),Object.defineProperty(e,t,Ir)}function qe(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),ar.target&&t.depend(),t.value}}function ze(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?w:m(t[n],e)}function Je(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)He(e,n,r[o]);else He(e,n,r)}}function He(e,t,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Ge(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}function Xe(e){var t=Ke(e.$options.inject,e);t&&(f
 r.shouldConvert=!1,Object.keys(t).forEach(function(n){$(e,n,t[n])}),fr.shouldConvert=!0)}function Ke(e,t){if(e){for(var n=Object.create(null),r=rr?Reflect.ownKeys(e):Object.keys(e),o=0;o<r.length;o++)for(var i=r[o],a=e[i],s=t;s;){if(s._provided&&a in s._provided){n[i]=s._provided[a];break}s=s.$parent}return n}}function Ze(e,t,n,o,i){var a={},s=e.options.props;if(r(s))for(var u in s)a[u]=G(u,s,t||Un);else r(n.attrs)&&Qe(a,n.attrs),r(n.props)&&Qe(a,n.props);var c=Object.create(o),l=function(e,t,n,r){return ot(c,e,t,n,r,!0)},f=e.options.render.call(null,l,{data:n,props:a,children:i,parent:o,listeners:n.on||Un,injections:Ke(e.options.inject,o),slots:function(){return ge(i,o)}});return f instanceof vr&&(f.functionalContext=o,f.functionalOptions=e.options,n.slot&&((f.data||(f.data={})).slot=n.slot)),f}function Qe(e,t){for(var n in t)e[Tn(n)]=t[n]}function Ye(e,t,i,a,u){if(!n(e)){var c=i.$options._base;if(s(e)&&(e=c.extend(e)),"function"==typeof e){var l;if(n(e.cid)&&(l=e,void 0===(e=pe(l,
 c,i))))return fe(l,t,i,a,u);t=t||{},gt(e),r(t.model)&&rt(e.options,t);var f=oe(t,e,u);if(o(e.options.functional))return Ze(e,f,t,i,a);var p=t.on;if(t.on=t.nativeOn,o(e.options.abstract)){var d=t.slot;t={},d&&(t.slot=d)}tt(t);var h=e.options.name||u;return new vr("vue-component-"+e.cid+(h?"-"+h:""),t,void 0,void 0,void 0,i,{Ctor:e,propsData:f,listeners:p,tag:u,children:a},l)}}}function et(e,t,n,o){var i=e.componentOptions,a={_isComponent:!0,parent:t,propsData:i.propsData,_componentTag:i.tag,_parentVnode:e,_parentListeners:i.listeners,_renderChildren:i.children,_parentElm:n||null,_refElm:o||null},s=e.data.inlineTemplate;return r(s)&&(a.render=s.render,a.staticRenderFns=s.staticRenderFns),new i.Ctor(a)}function tt(e){e.hook||(e.hook={});for(var t=0;t<Pr.length;t++){var n=Pr[t],r=e.hook[n],o=Nr[n];e.hook[n]=r?nt(o,r):o}}function nt(e,t){return function(n,r,o,i){e(n,r,o,i),t(n,r,o,i)}}function rt(e,t){var n=e.model&&e.model.prop||"value",o=e.model&&e.model.event||"input";(t.props||(t.pro
 ps={}))[n]=t.model.value;var i=t.on||(t.on={});r(i[o])?i[o]=[t.model.callback].concat(i[o]):i[o]=t.model.callback}function ot(e,t,n,r,i,s){return(Array.isArray(n)||a(n))&&(i=r,r=n,n=void 0),o(s)&&(i=$r),it(e,t,n,r,i)}function it(e,t,n,o,i){if(r(n)&&r(n.__ob__))return _r();if(r(n)&&r(n.is)&&(t=n.is),!t)return _r();Array.isArray(o)&&"function"==typeof o[0]&&(n=n||{},n.scopedSlots={default:o[0]},o.length=0),i===$r?o=se(o):i===Mr&&(o=ae(o));var a,s;if("string"==typeof t){var u;s=e.$vnode&&e.$vnode.ns||Wn.getTagNamespace(t),a=Wn.isReservedTag(t)?new vr(Wn.parsePlatformTagName(t),n,o,void 0,void 0,e):r(u=H(e.$options,"components",t))?Ye(u,n,e,o,t):new vr(t,n,o,void 0,void 0,e)}else a=Ye(t,n,e,o);return r(a)?(s&&at(a,s),a):_r()}function at(e,t){if(e.ns=t,"foreignObject"!==e.tag&&r(e.children))for(var o=0,i=e.children.length;o<i;o++){var a=e.children[o];r(a.tag)&&n(a.ns)&&at(a,t)}}function st(e,t){var n,o,i,a,u;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),o=0,i=e.length
 ;o<i;o++)n[o]=t(e[o],o);else if("number"==typeof e)for(n=new Array(e),o=0;o<e;o++)n[o]=t(o+1,o);else if(s(e))for(a=Object.keys(e),n=new Array(a.length),o=0,i=a.length;o<i;o++)u=a[o],n[o]=t(e[u],u,o);return r(n)&&(n._isVList=!0),n}function ut(e,t,n,r){var o=this.$scopedSlots[e];if(o)return n=n||{},r&&(n=g(g({},r),n)),o(n)||t;var i=this.$slots[e];return i||t}function ct(e){return H(this.$options,"filters",e,!0)||Rn}function lt(e,t,n){var r=Wn.keyCodes[t]||n;return Array.isArray(r)?-1===r.indexOf(e):r!==e}function ft(e,t,n,r,o){if(n)if(s(n)){Array.isArray(n)&&(n=b(n));var i;for(var a in n)!function(a){if("class"===a||"style"===a||jn(a))i=e;else{var s=e.attrs&&e.attrs.type;i=r||Wn.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}if(!(a in i)&&(i[a]=n[a],o)){(e.on||(e.on={}))["update:"+a]=function(e){n[a]=e}}}(a)}else;return e}function pt(e,t){var n=this._staticTrees[e];return n&&!t?Array.isArray(n)?ee(n):Y(n):(n=this._staticTrees[e]=this.$options.staticRenderFns[e].c
 all(this._renderProxy),ht(n,"__static__"+e,!1),n)}function dt(e,t,n){return ht(e,"__once__"+t+(n?"_"+n:""),!0),e}function ht(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&vt(e[r],t+"_"+r,n);else vt(e,t,n)}function vt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function yt(e,t){if(t)if(u(t)){var n=e.on=e.on?g({},e.on):{};for(var r in t){var o=n[r],i=t[r];n[r]=o?[].concat(i,o):i}}else;return e}function mt(e){e._vnode=null,e._staticTrees=null;var t=e.$vnode=e.$options._parentVnode,n=t&&t.context;e.$slots=ge(e.$options._renderChildren,n),e.$scopedSlots=Un,e._c=function(t,n,r,o){return ot(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return ot(e,t,n,r,o,!0)};var r=t&&t.data;$(e,"$attrs",r&&r.attrs||Un,null,!0),$(e,"$listeners",e.$options._parentListeners||Un,null,!0)}function _t(e,t){var n=e.$options=Object.create(e.constructor.options);n.parent=t.parent,n.propsData=t.propsData,n._parentVnode=t._parentVnode,n._parentListeners=t._parentListeners,n._ren
 derChildren=t._renderChildren,n._componentTag=t._componentTag,n._parentElm=t._parentElm,n._refElm=t._refElm,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function gt(e){var t=e.options;if(e.super){var n=gt(e.super);if(n!==e.superOptions){e.superOptions=n;var r=bt(e);r&&g(e.extendOptions,r),t=e.options=J(n,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function bt(e){var t,n=e.options,r=e.extendOptions,o=e.sealedOptions;for(var i in n)n[i]!==o[i]&&(t||(t={}),t[i]=wt(n[i],r[i],o[i]));return t}function wt(e,t,n){if(Array.isArray(e)){var r=[];n=Array.isArray(n)?n:[n],t=Array.isArray(t)?t:[t];for(var o=0;o<e.length;o++)(t.indexOf(e[o])>=0||n.indexOf(e[o])<0)&&r.push(e[o]);return r}return e}function xt(e){this._init(e)}function Et(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.a
 pply(null,n),t.push(e),this}}function Ot(e){e.mixin=function(e){return this.options=J(this.options,e),this}}function St(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=J(n.options,e),a.super=n,a.options.props&&Ct(a),a.options.computed&&kt(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Fn.forEach(function(e){a[e]=n[e]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=g({},a.options),o[r]=a,a}}function Ct(e){var t=e.options.props;for(var n in t)De(e.prototype,"_props",n)}function kt(e){var t=e.options.computed;for(var n in t)Be(e.prototype,n,t[n])}function jt(e){Fn.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:
 n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function At(e){return e&&(e.Ctor.options.name||e.tag)}function It(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!c(e)&&e.test(t)}function Tt(e,t,n){for(var r in e){var o=e[r];if(o){var i=At(o.componentOptions);i&&!n(i)&&(o!==t&&Nt(o),e[r]=null)}}}function Nt(e){e&&e.componentInstance.$destroy()}function Pt(e){return new t.Element(e)}function Mt(e,n){return new t.Element(e+":"+n)}function $t(e){return new t.TextNode(e)}function Rt(e){return new t.Comment(e)}function Dt(e,t,n){if(3!==t.nodeType)e.insertBefore(t,n);else if("text"===e.type)e.setAttr("value",t.text),t.parentNode=e;else{var r=Pt("text");r.setAttr("value",t.text),e.insertBefore(r,n)}}function Ft(e,t){if(3===t.nodeType)return void e.setAttr("value","");e.removeChild(t)}function Lt(e,t){if(3!==t.nodeType)e.appendChild(t);else if("text"===e.type)e.setAttr("value",t.text),t.parentNode=e;else{var n=Pt("text");n.setAt
 tr("value",t.text),e.appendChild(n)}}function Wt(e){return e.parentNode}function Ut(e){return e.nextSibling}function Vt(e){return e.type}function Bt(e,t){e.parentNode.setAttr("value",t)}function qt(e,t,n){e.setAttr(t,n)}function zt(e,t){var n=e.data.ref;if(n){var r=e.context,o=e.componentInstance||e.elm,i=r.$refs;t?Array.isArray(i[n])?h(i[n],o):i[n]===o&&(i[n]=void 0):e.data.refInFor?Array.isArray(i[n])?i[n].indexOf(o)<0&&i[n].push(o):i[n]=[o]:i[n]=o}}function Jt(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&r(e.data)===r(t.data)&&Ht(e,t)||o(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&n(t.asyncFactory.error))}function Ht(e,t){if("input"!==e.tag)return!0;var n,o=r(n=e.data)&&r(n=n.attrs)&&n.type,i=r(n=t.data)&&r(n=n.attrs)&&n.type;return o===i||qr(o)&&qr(i)}function Gt(e,t,n){var o,i,a={};for(o=t;o<=n;++o)i=e[o].key,r(i)&&(a[i]=o);return a}function Xt(e,t){(e.data.directives||t.data.directives)&&Kt(e,t)}function Kt(e,t){var n,r,o,i=e===zr,a=t===zr,
 s=Zt(e.data.directives,e.context),u=Zt(t.data.directives,t.context),c=[],l=[];for(n in u)r=s[n],
-o=u[n],r?(o.oldValue=r.value,Yt(o,"update",t,e),o.def&&o.def.componentUpdated&&l.push(o)):(Yt(o,"bind",t,e),o.def&&o.def.inserted&&c.push(o));if(c.length){var f=function(){for(var n=0;n<c.length;n++)Yt(c[n],"inserted",t,e)};i?re(t.data.hook||(t.data.hook={}),"insert",f):f()}if(l.length&&re(t.data.hook||(t.data.hook={}),"postpatch",function(){for(var n=0;n<l.length;n++)Yt(l[n],"componentUpdated",t,e)}),!i)for(n in s)u[n]||Yt(s[n],"unbind",e,e,a)}function Zt(e,t){var n=Object.create(null);if(!e)return n;var r,o;for(r=0;r<e.length;r++)o=e[r],o.modifiers||(o.modifiers=Gr),n[Qt(o)]=o,o.def=H(t.$options,"directives",o.name,!0);return n}function Qt(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function Yt(e,t,n,r,o){var i=e.def&&e.def[t];if(i)try{i(n.elm,e,n,r,o)}catch(r){j(r,n.context,"directive "+e.name+" "+t+" hook")}}function en(e,t){if(e.data.attrs||t.data.attrs){var n,r,o=t.elm,i=e.data.attrs||{},a=t.data.attrs||{};a.__ob__&&(a=t.data.attrs=g({},a));for(n in 
 a)r=a[n],i[n]!==r&&o.setAttr(n,r);for(n in i)null==a[n]&&o.setAttr(n)}}function tn(e,t){var n=t.elm,r=t.context,o=t.data,i=e.data;if(o.staticClass||o.class||i&&(i.staticClass||i.class)){var a=[],s=i.staticClass;s&&a.push.apply(a,s),i.class&&a.push.apply(a,i.class);var u=[],c=o.staticClass;c&&u.push.apply(u,c),o.class&&u.push.apply(u,o.class);var l=nn(a,u,r);for(var f in l)n.setStyle(f,l[f])}}function nn(e,t,n){var r=n.$options.style||{},o={};return t.forEach(function(e){g(o,r[e])}),e.forEach(function(e){var t=r[e];for(var n in t)o.hasOwnProperty(n)||(o[n]="")}),o}function rn(e,t,n,r,o,i){if(r)return void console.log("Weex do not support event in bubble phase.");if(n){var a=t,s=Wr;t=function(t){null!==(1===arguments.length?a(t):a.apply(null,arguments))&&on(e,null,null,s)}}Wr.addEvent(e,t,i)}function on(e,t,n,r){(r||Wr).removeEvent(e)}function an(e,t){if(e.data.on||t.data.on){var n=t.data.on||{},r=e.data.on||{};Wr=t.elm,ne(n,r,rn,on,t.context)}}function sn(e,t){if(!t.data.staticStyle)
 return void un(e,t);var n=t.elm,r=t.data.staticStyle;for(var o in r)r[o]&&n.setStyle(Yr(o),r[o]);un(e,t)}function un(e,t){if(e.data.style||t.data.style){var n,r,o=t.elm,i=e.data.style||{},a=t.data.style||{},s=a.__ob__;Array.isArray(a)&&(a=t.data.style=cn(a)),s&&(a=t.data.style=g({},a));for(r in i)a[r]||o.setStyle(Yr(r),"");for(r in a)n=a[r],o.setStyle(Yr(r),n)}}function cn(e){for(var t={},n=0;n<e.length;n++)e[n]&&g(t,e[n]);return t}function ln(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&g(t,to(e.name||"v")),g(t,e),t}return"string"==typeof e?to(e):void 0}}function fn(e,t){var n=t.elm;n._leaveCb&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=ln(t.data.transition);if(r&&!n._enterCb){for(var o=r.enterClass,i=r.enterToClass,a=r.enterActiveClass,s=r.appearClass,u=r.appearToClass,c=r.appearActiveClass,l=r.beforeEnter,f=r.enter,p=r.afterEnter,d=r.enterCancelled,h=r.beforeAppear,v=r.appear,y=r.afterAppear,m=r.appearCancelled,_=br,g=br.$vnode;g&&g.parent;)g=g.parent,_=g.context;
 var b=!_._isMounted||!t.isRootInsert;if(!b||v||""===v){var x=b?s:o,E=b?u:i,S=b?c:a,C=b?h||l:l,k=b&&"function"==typeof v?v:f,j=b?y||p:p,A=b?m||d:d,I=k&&(k._length||k.length)>1,T=t.context.$options.style||{},N=T[x],P=T["@TRANSITION"]&&T["@TRANSITION"][S]||{},M=dn(n,T,x,E,S,t.context),$=Object.keys(M).length>0,R=n._enterCb=O(function(){R.cancelled?A&&A(n):j&&j(n),n._enterCb=null});if(setTimeout(function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];if(r&&r.context===t.context&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),k&&k(n,R),$){t.context.$requireWeexModule("animation").transition(n.ref,{styles:M,duration:P.duration||0,delay:P.delay||0,timingFunction:P.timingFunction||"linear"},I?w:R)}else I||R()},16),C&&C(n),N)for(var D in N)n.setStyle(D,N[D]);$||I||R()}}}function pn(e,t){function n(){function t(){n.transition(r.ref,{styles:y,duration:m.duration||0,delay:m.delay||0,timingFunction:m.timingFunction||"linear"},d?w:_)}var n=e.context.$requireWeexModule("animation");_.can
 celled||(e.data.show||((r.parentNode._pending||(r.parentNode._pending={}))[e.key]=e),u&&u(r),v?n.transition(r.ref,{styles:v},t):t(),c&&c(r,_),y||d||_())}var r=e.elm;r._enterCb&&(r._enterCb.cancelled=!0,r._enterCb());var o=ln(e.data.transition);if(!o)return t();if(!r._leaveCb){var i=o.leaveClass,a=o.leaveToClass,s=o.leaveActiveClass,u=o.beforeLeave,c=o.leave,l=o.afterLeave,f=o.leaveCancelled,p=o.delayLeave,d=c&&(c._length||c.length)>1,h=e.context.$options.style||{},v=h[i],y=h[a]||h[s],m=h["@TRANSITION"]&&h["@TRANSITION"][s]||{},_=r._leaveCb=O(function(){r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[e.key]=null),_.cancelled?f&&f(r):(t(),l&&l(r)),r._leaveCb=null});p?p(n):n()}}function dn(e,t,n,r,o,i){var a={},s=t[n],u=t[r],c=t[o];if(s)for(var l in s)a[l]=e.style[l];if(c)for(var f in c)0!==f.indexOf("transition")&&(a[f]=c[f]);return u&&g(a,u),a}function hn(e){return e.tag?e.tag.replace(/vue\-component\-(\d+\-)?/,""):""}function vn(e){return e.children&&1===e.children.lengt
 h&&!e.children[0].tag}function yn(e){var t=String(e).match(so);return t?Number(t[1]):e}function mn(e){if(e&&e.data){var t=e.data,n=t.staticStyle,r=t.staticClass;if(e.data.style||e.data.class||n||r){var o=Object.assign({},n,e.data.style),i=e.context.$options.style||{};[].concat(r,e.data.class).forEach(function(e){e&&i[e]&&Object.assign(o,i[e])});for(var a in o)o[a]=yn(o[a]);return o}}}function _n(e){if(e.length)return e.map(function(e){var t=hn(e),n={type:t};if(t){if(n.style=mn(e),e.data&&(n.attr=e.data.attrs,e.data.on&&(n.events=e.data.on)),"span"===t&&vn(e))return n.attr=n.attr||{},n.attr.value=e.children[0].text.trim(),n}else n.type="span",n.attr={value:(e.text||"").trim()};return e.children&&e.children.length&&(n.children=_n(e.children)),n})}function gn(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?gn(he(t.children)):e}function bn(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var i in o)t[Tn(i)]=o[i];return t}function 
 wn(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function xn(e){for(;e=e.parent;)if(e.data.transition)return!0}function En(e,t){return t.key===e.key&&t.tag===e.tag}function On(){}function Sn(){}function Cn(e,n){var r=new t.Comment("root");return r.hasAttribute=r.removeAttribute=function(){},n.documentElement.appendChild(r),r}var kn=Object.prototype.toString,jn=(d("slot,component",!0),d("key,ref,slot,is")),An=Object.prototype.hasOwnProperty,In=/-(\w)/g,Tn=y(function(e){return e.replace(In,function(e,t){return t?t.toUpperCase():""})}),Nn=y(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),Pn=/\B([A-Z])/g,Mn=y(function(e){return e.replace(Pn,"-$1").toLowerCase()}),$n=function(e,t,n){return!1},Rn=function(e){return e},Dn="data-server-rendered",Fn=["component","directive","filter"],Ln=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated"],Wn={optionMergeSt
 rategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:$n,isReservedAttr:$n,isUnknownElement:$n,getTagNamespace:w,parsePlatformTagName:Rn,mustUseProp:$n,_lifecycleHooks:Ln},Un=Object.freeze({}),Vn=/[^\w.$]/,Bn=w,qn="__proto__"in{},zn="undefined"!=typeof window,Jn=zn&&window.navigator.userAgent.toLowerCase(),Gn=(Jn&&/msie|trident/.test(Jn),Jn&&Jn.indexOf("msie 9.0"),Jn&&Jn.indexOf("edge/")>0),Xn=(Jn&&Jn.indexOf("android"),Jn&&/iphone|ipad|ipod|ios/.test(Jn)),Kn=(Jn&&/chrome\/\d+/.test(Jn),{}.watch),Zn=!1;if(zn)try{var Qn={};Object.defineProperty(Qn,"passive",{get:function(){Zn=!0}}),window.addEventListener("test-passive",null,Qn)}catch(e){}var Yn,er,tr=function(){return void 0===Yn&&(Yn=!zn&&void 0!==Hn&&"server"===Hn.process.env.VUE_ENV),Yn},nr=zn&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,rr="undefined"!=typeof Symbol&&A(Symbol)&&"undefined"!=typeof Reflect&&A(Refl
 ect.ownKeys),or=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t<e.length;t++)e[t]()}var t,n=[],r=!1;if("undefined"!=typeof Promise&&A(Promise)){var o=Promise.resolve(),i=function(e){console.error(e)};t=function(){o.then(e).catch(i),Xn&&setTimeout(w)}}else if("undefined"==typeof MutationObserver||!A(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())t=function(){setTimeout(e,0)};else{var a=1,s=new MutationObserver(e),u=document.createTextNode(String(a));s.observe(u,{characterData:!0}),t=function(){a=(a+1)%2,u.data=String(a)}}return function(e,o){var i;if(n.push(function(){if(e)try{e.call(o)}catch(e){j(e,o,"nextTick")}else i&&i(o)}),r||(r=!0,t()),!e&&"undefined"!=typeof Promise)return new Promise(function(e,t){i=e})}}();er="undefined"!=typeof Set&&A(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.cl
 ear=function(){this.set=Object.create(null)},e}();var ir=0,ar=function(){this.id=ir++,this.subs=[]};ar.prototype.addSub=function(e){this.subs.push(e)},ar.prototype.removeSub=function(e){h(this.subs,e)},ar.prototype.depend=function(){ar.target&&ar.target.addDep(this)},ar.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},ar.target=null;var sr=[],ur=Array.prototype,cr=Object.create(ur);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=ur[e];C(cr,e,function(){for(var n=arguments,r=[],o=arguments.length;o--;)r[o]=n[o];var i,a=t.apply(this,r),s=this.__ob__;switch(e){case"push":case"unshift":i=r;break;case"splice":i=r.slice(2)}return i&&s.observeArray(i),s.dep.notify(),a})});var lr=Object.getOwnPropertyNames(cr),fr={shouldConvert:!0},pr=function(e){if(this.value=e,this.dep=new ar,this.vmCount=0,C(e,"__ob__",this),Array.isArray(e)){(qn?N:P)(e,cr,lr),this.observeArray(e)}else this.walk(e)};pr.prototype.walk=functi
 on(e){for(var t=Object.keys(e),n=0;n<t.length;n++)$(e,t[n],e[t[n]])},pr.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)M(e[t])};var dr=Wn.optionMergeStrategies;dr.data=function(e,t,n){return n?W(e,t,n):t&&"function"!=typeof t?e:W.call(this,e,t)},Ln.forEach(function(e){dr[e]=U}),Fn.forEach(function(e){dr[e+"s"]=V}),dr.watch=function(e,t){if(e===Kn&&(e=void 0),t===Kn&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var n={};g(n,e);for(var r in t){var o=n[r],i=t[r];o&&!Array.isArray(o)&&(o=[o]),n[r]=o?o.concat(i):Array.isArray(i)?i:[i]}return n},dr.props=dr.methods=dr.inject=dr.computed=function(e,t){if(!e)return t;var n=Object.create(null);return g(n,e),t&&g(n,t),n},dr.provide=W;var hr=function(e,t){return void 0===t?e:t},vr=function(e,t,n,r,o,i,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.functionalContext=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=vo
 id 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},yr={child:{}};yr.child.get=function(){return this.componentInstance},Object.defineProperties(vr.prototype,yr);var mr,_r=function(e){void 0===e&&(e="");var t=new vr;return t.text=e,t.isComment=!0,t},gr=y(function(e){var t="&"===e.charAt(0);e=t?e.slice(1):e;var n="~"===e.charAt(0);e=n?e.slice(1):e;var r="!"===e.charAt(0);return e=r?e.slice(1):e,{name:e,once:n,capture:r,passive:t}}),br=null,wr=[],xr=[],Er={},Or=!1,Sr=!1,Cr=0,kr=0,jr=function(e,t,n,r){this.vm=e,e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++kr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new er,this.newDepIds=new er,this.expression="","function"==typeof t?this.getter=t:(this.getter=k(t),this.getter||
 (this.getter=function(){})),this.value=this.lazy?void 0:this.get()};jr.prototype.get=function(){I(this);var e,t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;j(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&$e(e),T(),this.cleanupDeps()}return e},jr.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},jr.prototype.cleanupDeps=function(){for(var e=this,t=this.deps.length;t--;){var n=e.deps[t];e.newDepIds.has(n.id)||n.removeSub(e)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},jr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Me(this)},jr.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||s(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){j(e,this.v
 m,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},jr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},jr.prototype.depend=function(){for(var e=this,t=this.deps.length;t--;)e.deps[t].depend()},jr.prototype.teardown=function(){var e=this;if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var t=this.deps.length;t--;)e.deps[t].removeSub(e);this.active=!1}};var Ar=new er,Ir={enumerable:!0,configurable:!0,get:w,set:w},Tr={lazy:!0},Nr={init:function(e,t,n,r){if(!e.componentInstance||e.componentInstance._isDestroyed){(e.componentInstance=et(e,br,n,r)).$mount(t?e.elm:void 0,t)}else if(e.data.keepAlive){var o=e;Nr.prepatch(o,o)}},prepatch:function(e,t){var n=t.componentOptions;Oe(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,je(n,"mounted")),e.data.keepAlive&&(t._isMounted?Ne(n):Ce(n,!0))},destroy:funct
 ion(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?ke(t,!0):t.$destroy())}},Pr=Object.keys(Nr),Mr=1,$r=2,Rr=0;!function(e){e.prototype._init=function(e){var t=this;t._uid=Rr++,t._isVue=!0,e&&e._isComponent?_t(t,e):t.$options=J(gt(t.constructor),e||{},t),t._renderProxy=t,t._self=t,xe(t),ve(t),mt(t),je(t,"beforeCreate"),Xe(t),Fe(t),Ge(t),je(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(xt),function(e){var t={};t.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=R,e.prototype.$delete=D,e.prototype.$watch=function(e,t,n){var r=this;if(u(t))return He(r,e,t,n);n=n||{},n.user=!0;var o=new jr(r,e,t,n);return n.immediate&&t.call(r,o.value),function(){o.teardown()}}}(xt),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this,o=this;if(Array.isArray(e))for(var i=0,a=e.length;i<a;i++)r.$on(e[i],n);else(o._events[e]||(o._ev
 ents[e]=[])).push(n),t.test(e)&&(o._hasHookEvent=!0);return o},e.prototype.$once=function(e,t){function n(){r.$off(e,n),t.apply(r,arguments)}var r=this;return n.fn=t,r.$on(e,n),r},e.prototype.$off=function(e,t){var n=this,r=this;if(!arguments.length)return r._events=Object.create(null),r;if(Array.isArray(e)){for(var o=0,i=e.length;o<i;o++)n.$off(e[o],t);return r}var a=r._events[e];if(!a)return r;if(1===arguments.length)return r._events[e]=null,r;for(var s,u=a.length;u--;)if((s=a[u])===t||s.fn===t){a.splice(u,1);break}return r},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?_(n):n;for(var r=_(arguments,1),o=0,i=n.length;o<i;o++)try{n[o].apply(t,r)}catch(n){j(n,t,'event handler for "'+e+'"')}}return t}}(xt),function(e){e.prototype._update=function(e,t){var n=this;n._isMounted&&je(n,"beforeUpdate");var r=n.$el,o=n._vnode,i=br;br=n,n._vnode=e,o?n.$el=n.__patch__(o,e):(n.$el=n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentE
 lm=n.$options._refElm=null),br=i,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){je(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||h(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),je(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null)}}}(xt),function(e){e.prototype.$nextTick=function(e){return or(e,this)},e.prototype._render=function(){var e=this,t=e.$options,n=t.render,r=t.staticRenderFns,o=t._parentVnode;if(e._isMounted)for(var i in e.$slots){var a=e.$slots[i];a._rendered&&(e.$slots[i]=ee(a,!0))}e.$scopedSlots=o&&o.data.scopedSlots||Un,r&&!e._staticTrees&&(e._static
 Trees=[]),e.$vnode=o;var s;try{s=n.call(e._renderProxy,e.$createElement)}catch(t){j(t,e,"render function"),s=e._vnode}return s instanceof vr||(s=_r()),s.parent=o,s},e.prototype._o=dt,e.prototype._n=p,e.prototype._s=f,e.prototype._l=st,e.prototype._t=ut,e.prototype._q=x,e.prototype._i=E,e.prototype._m=pt,e.prototype._f=ct,e.prototype._k=lt,e.prototype._b=ft,e.prototype._v=Q,e.prototype._e=_r,e.prototype._u=we,e.prototype._g=yt}(xt);var Dr=[String,RegExp,Array],Fr={name:"keep-alive",abstract:!0,props:{include:Dr,exclude:Dr},created:function(){this.cache=Object.create(null)},destroyed:function(){var e=this;for(var t in e.cache)Nt(e.cache[t])},watch:{include:function(e){Tt(this.cache,this._vnode,function(t){return It(e,t)})},exclude:function(e){Tt(this.cache,this._vnode,function(t){return!It(e,t)})}},render:function(){var e=he(this.$slots.default),t=e&&e.componentOptions;if(t){var n=At(t);if(n&&(this.include&&!It(this.include,n)||this.exclude&&It(this.exclude,n)))return e;var r=null==e.
 key?t.Ctor.cid+(t.tag?"::"+t.tag:""):e.key;this.cache[r]?e.componentInstance=this.cache[r].componentInstance:this.cache[r]=e,e.data.keepAlive=!0}return e}},Lr={KeepAlive:Fr};!function(e){var t={};t.get=function(){return Wn},Object.defineProperty(e,"config",t),e.util={warn:Bn,extend:g,mergeOptions:J,defineReactive:$},e.set=R,e.delete=D,e.nextTick=or,e.options=Object.create(null),Fn.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,g(e.options.components,Lr),Et(e),Ot(e),St(e),jt(e)}(xt),Object.defineProperty(xt.prototype,"$isServer",{get:tr}),Object.defineProperty(xt.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),xt.version="2.4.2";var Wr,Ur={},Vr=Object.freeze({namespaceMap:Ur,createElement:Pt,createElementNS:Mt,createTextNode:$t,createComment:Rt,insertBefore:Dt,removeChild:Ft,appendChild:Lt,parentNode:Wt,nextSibling:Ut,tagName:Vt,setTextContent:Bt,setAttribute:qt}),Br={create:function(e,t){zt(t)},update:function(e,t){
 e.data.ref!==t.data.ref&&(zt(e,!0),zt(t))},destroy:function(e){zt(e,!0)}},qr=(d("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),d("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),d("text,number,password,search,email,tel,url")),zr=new vr("",{},[]),Jr=[
 "create","activate","update","remove","destroy"],Hr={create:Xt,update:Xt,destroy:function(e){Xt(e,zr)}},Gr=Object.create(null),Xr=[Br,Hr],Kr={create:en,update:en},Zr={create:tn,update:tn},Qr={create:an,update:an},Yr=y(Tn),eo={create:sn,update:un},to=y(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),no=(zn&&window.requestAnimationFrame&&window.requestAnimationFrame.bind(window),{create:fn,activate:fn,remove:pn}),ro=[Kr,Zr,Qr,eo,no],oo=ro.concat(Xr),io=function(e){function t(e){return new vr(T.tagName(e).toLowerCase(),{},[],void 0,e)}function i(e,t){function n(){0==--n.listeners&&s(e)}return n.listeners=t,n}function s(e){var t=T.parentNode(e);r(t)&&T.removeChild(t,e)}function u(e,t,n,i,a){if(e.isRootInsert=!a,!c(e,t,n,i)){var s=e.data,u=e.children,l=e.tag;if(r(l)){e.elm=e.ns?T.createElementNS(e.ns,l):T.createElement(l,e),m(e);var f=r(s)&&o(s.app
 endAsTree);f||(r(s)&&y(e,t),p(n,e.elm,i)),h(e,u,t),f&&(r(s)&&y(e,t),p(n,e.elm,i))}else o(e.isComment)?(e.elm=T.createComment(e.text),p(n,e.elm,i)):(e.elm=T.createTextNode(e.text),p(n,e.elm,i))}}function c(e,t,n,i){var a=e.data;if(r(a)){var s=r(e.componentInstance)&&a.keepAlive;if(r(a=a.hook)&&r(a=a.init)&&a(e,!1,n,i),r(e.componentInstance))return l(e,t),o(s)&&f(e,t,n,i),!0}}function l(e,t){r(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,v(e)?(y(e,t),m(e)):(zt(e),t.push(e))}function f(e,t,n,o){for(var i,a=e;a.componentInstance;)if(a=a.componentInstance._vnode,r(i=a.data)&&r(i=i.transition)){for(i=0;i<A.activate.length;++i)A.activate[i](zr,a);t.push(a);break}p(n,e.elm,o)}function p(e,t,n){r(e)&&(r(n)?n.parentNode===e&&T.insertBefore(e,t,n):T.appendChild(e,t))}function h(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)u(t[r],n,e.elm,null,!0);else a(e.text)&&T.appendChild(e.elm,T.createTextNode(e.text))}functi
 on v(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return r(e.tag)}function y(e,t){for(var n=0;n<A.create.length;++n)A.create[n](zr,e);k=e.data.hook,r(k)&&(r(k.create)&&k.create(zr,e),r(k.insert)&&t.push(e))}function m(e){for(var t,n=e;n;)r(t=n.context)&&r(t=t.$options._scopeId)&&T.setAttribute(e.elm,t,""),n=n.parent;r(t=br)&&t!==e.context&&r(t=t.$options._scopeId)&&T.setAttribute(e.elm,t,"")}function _(e,t,n,r,o,i){for(;r<=o;++r)u(n[r],i,e,t)}function g(e){var t,n,o=e.data;if(r(o))for(r(t=o.hook)&&r(t=t.destroy)&&t(e),t=0;t<A.destroy.length;++t)A.destroy[t](e);if(r(t=e.children))for(n=0;n<e.children.length;++n)g(e.children[n])}function b(e,t,n,o){for(;n<=o;++n){var i=t[n];r(i)&&(r(i.tag)?(w(i),g(i)):s(i.elm))}}function w(e,t){if(r(t)||r(e.data)){var n,o=A.remove.length+1;for(r(t)?t.listeners+=o:t=i(e.elm,o),r(n=e.componentInstance)&&r(n=n._vnode)&&r(n.data)&&w(n,t),n=0;n<A.remove.length;++n)A.remove[n](e,t);r(n=e.data.hook)&&r(n=n.remove)?n(e,t):t()}else s(e.elm)}functi
 on x(e,t,o,i,a){for(var s,c,l,f,p=0,d=0,h=t.length-1,v=t[0],y=t[h],m=o.length-1,g=o[0],w=o[m],x=!a;p<=h&&d<=m;)n(v)?v=t[++p]:n(y)?y=t[--h]:Jt(v,g)?(O(v,g,i),v=t[++p],g=o[++d]):Jt(y,w)?(O(y,w,i),y=t[--h],w=o[--m]):Jt(v,w)?(O(v,w,i),x&&T.insertBefore(e,v.elm,T.nextSibling(y.elm)),v=t[++p],w=o[--m]):Jt(y,g)?(O(y,g,i),x&&T.insertBefore(e,y.elm,v.elm),y=t[--h],g=o[++d]):(n(s)&&(s=Gt(t,p,h)),c=r(g.key)?s[g.key]:E(g,t,p,h),n(c)?u(g,i,e,v.elm):(l=t[c],Jt(l,g)?(O(l,g,i),t[c]=void 0,x&&T.insertBefore(e,l.elm,v.elm)):u(g,i,e,v.elm)),g=o[++d]);p>h?(f=n(o[m+1])?null:o[m+1].elm,_(e,f,o,d,m,i)):d>m&&b(e,t,p,h)}function E(e,t,n,o){for(var i=n;i<o;i++){var a=t[i];if(r(a)&&Jt(e,a))return i}}function O(e,t,i,a){if(e!==t){var s=t.elm=e.elm;if(o(e.isAsyncPlaceholder))return void(r(t.asyncFactory.resolved)?C(e.elm,t,i):t.isAsyncPlaceholder=!0);if(o(t.isStatic)&&o(e.isStatic)&&t.key===e.key&&(o(t.isCloned)||o(t.isOnce)))return void(t.componentInstance=e.componentInstance);var u,c=t.data;r(c)&&r(u=c.hook)&
 &r(u=u.prepatch)&&u(e,t);var l=e.children,f=t.children;if(r(c)&&v(t)){for(u=0;u<A.update.length;++u)A.update[u](e,t);r(u=c.hook)&&r(u=u.update)&&u(e,t)}n(t.text)?r(l)&&r(f)?l!==f&&x(s,l,f,i,a):r(f)?(r(e.text)&&T.setTextContent(s,""),_(s,null,f,0,f.length-1,i)):r(l)?b(s,l,0,l.length-1):r(e.text)&&T.setTextContent(s,""):e.text!==t.text&&T.setTextContent(s,t.text),r(c)&&r(u=c.hook)&&r(u=u.postpatch)&&u(e,t)}}function S(e,t,n){if(o(n)&&r(e.parent))e.parent.data.pendingInsert=t;else for(var i=0;i<t.length;++i)t[i].data.hook.insert(t[i])}function C(e,t,n){if(o(t.isComment)&&r(t.asyncFactory))return t.elm=e,t.isAsyncPlaceholder=!0,!0;t.elm=e;var i=t.tag,a=t.data,s=t.children;if(r(a)&&(r(k=a.hook)&&r(k=k.init)&&k(t,!0),r(k=t.componentInstance)))return l(t,n),!0;if(r(i)){if(r(s))if(e.hasChildNodes()){for(var u=!0,c=e.firstChild,f=0;f<s.length;f++){if(!c||!C(c,s[f],n)){u=!1;break}c=c.nextSibling}if(!u||c)return!1}else h(t,s,n);if(r(a))for(var p in a)if(!N(p)){y(t,n);break}}else e.data!==t.tex
 t&&(e.data=t.text);return!0}var k,j,A={},I=e.modules,T=e.nodeOps;for(k=0;k<Jr.length;++k)for(A[Jr[k]]=[],j=0;j<I.length;++j)r(I[j][Jr[k]])&&A[Jr[k]].push(I[j][Jr[k]]);var N=d("attrs,style,class,staticC

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/test/screenshot/border-android.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-android.png b/test/screenshot/border-android.png
deleted file mode 100644
index 166a287..0000000
Binary files a/test/screenshot/border-android.png and /dev/null differ



[08/18] incubator-weex git commit: Revert: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/test/screenshot/border-ios.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-ios.png b/test/screenshot/border-ios.png
index 992ea7d..2bacdd3 100644
Binary files a/test/screenshot/border-ios.png and b/test/screenshot/border-ios.png differ


[12/18] incubator-weex git commit: Revert: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
index 3f0b6e3..a949e3b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
+++ b/android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java
@@ -19,9 +19,6 @@
 package com.taobao.weex.bridge;
 
 import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.os.Build;
 import android.os.Handler;
 import android.os.Handler.Callback;
 import android.os.Looper;
@@ -85,26 +82,26 @@ import static com.taobao.weex.bridge.WXModuleManager.getDomModule;
 /**
  * Manager class for communication between JavaScript and Android.
  * <ol>
- * <li>
- * Handle Android to JavaScript call, can be one of the following
- * <ul>
- * <li>{@link #createInstance(String, String, Map, String)}</li>
- * <li>{@link #destroyInstance(String)}</li>
- * <li>{@link #refreshInstance(String, WXRefreshData)}</li>
- * <li>{@link #registerModules(Map)}</li>
- * <li>{@link #registerComponents(List)}</li>
- * <li>{@link #invokeCallJSBatch(Message)}</li>
- * </ul>
- * </li>
- * <li>
- * Handle JavaScript to Android call
- * </li>
- * <li>
- * Handle next tick of message.
- * </li>
+ *   <li>
+ *     Handle Android to JavaScript call, can be one of the following
+ *     <ul>
+ *       <li>{@link #createInstance(String, String, Map, String)}</li>
+ *       <li>{@link #destroyInstance(String)}</li>
+ *       <li>{@link #refreshInstance(String, WXRefreshData)}</li>
+ *       <li>{@link #registerModules(Map)}</li>
+ *       <li>{@link #registerComponents(List)}</li>
+ *       <li>{@link #invokeCallJSBatch(Message)}</li>
+ *     </ul>
+ *   </li>
+ *   <li>
+ *     Handle JavaScript to Android call
+ *   </li>
+ *   <li>
+ *     Handle next tick of message.
+ *   </li>
  * </ol>
  */
-public class WXBridgeManager implements Callback, BactchExecutor {
+public class WXBridgeManager implements Callback,BactchExecutor {
 
   public static final String METHOD_CREATE_INSTANCE = "createInstance";
   public static final String METHOD_DESTROY_INSTANCE = "destroyInstance";
@@ -130,28 +127,33 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   public static final String KEY_PARAMS = "params";
   public static final String ARGS = "args";
   public static final String OPTIONS = "options";
-  public static final String INITLOGFILE = "/jsserver_start.log";
   private static final String NON_CALLBACK = "-1";
   private static final String UNDEFINED = "undefined";
+
   private static final int INIT_FRAMEWORK_OK = 1;
-  private static final int CRASHREINIT = 50;
-  static volatile WXBridgeManager mBridgeManager;
+
   private static long LOW_MEM_VALUE = 120;
+
+  static volatile WXBridgeManager mBridgeManager;
+
+  private static final int CRASHREINIT = 50;
   private static int reInitCount = 1;
+
   private static String crashUrl = null;
   private static long lastCrashTime = 0;
-  /**
-   * package
-   **/
-  Handler mJSHandler;
+  public static final String INITLOGFILE = "/jsserver_start.log";
+
+
   /**
    * next tick tasks, can set priority
    */
   private WXHashMap<String, ArrayList<WXHashMap<String, Object>>> mNextTickTasks = new WXHashMap<>();
+
   /**
    * JSThread
    */
   private WXThread mJSThread;
+  /** package **/ Handler mJSHandler;
   private IWXBridge mWXBridge;
   private IWXDebugProxy mWxDebugProxy;
 
@@ -159,13 +161,22 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   /**
    * Whether JS Framework(main.js) has been initialized.
    */
-  private boolean mInit = false;
+  private boolean mInit =false;
+
+  private boolean isJSFrameworkInit(){
+    return mInit;
+  }
+
   private List<Map<String, Object>> mRegisterComponentFailList = new ArrayList<>(8);
   private List<Map<String, Object>> mRegisterModuleFailList = new ArrayList<>(8);
   private List<String> mRegisterServiceFailList = new ArrayList<>(8);
+
   private List<String> mDestroyedInstanceId = new ArrayList<>();
+
   private StringBuilder mLodBuilder = new StringBuilder(50);
+
   private Interceptor mInterceptor;
+
   private WXParams mInitParams;
 
   private WXBridgeManager() {
@@ -185,10 +196,6 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     return mBridgeManager;
   }
 
-  private boolean isJSFrameworkInit() {
-    return mInit;
-  }
-
   private void initWXBridge(boolean remoteDebug) {
     if (remoteDebug && WXEnvironment.isApkDebugable()) {
       WXEnvironment.sDebugServerConnectable = true;
@@ -205,7 +212,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
             Constructor constructor = clazz.getConstructor(Context.class, WXBridgeManager.class);
             if (constructor != null) {
               mWxDebugProxy = (IWXDebugProxy) constructor.newInstance(
-                  WXEnvironment.getApplication(), WXBridgeManager.this);
+                      WXEnvironment.getApplication(), WXBridgeManager.this);
               if (mWxDebugProxy != null) {
                 mWxDebugProxy.start();
               }
@@ -233,36 +240,36 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     }
   }
 
-  public Object callModuleMethod(String instanceId, String moduleStr, String methodStr, JSONArray args) {
-    return callModuleMethod(instanceId, moduleStr, methodStr, args, null);
+    public Object callModuleMethod(String instanceId, String moduleStr, String methodStr, JSONArray args) {
+      return  callModuleMethod(instanceId, moduleStr, methodStr, args, null);
   }
 
-  public Object callModuleMethod(String instanceId, String moduleStr, String methodStr, JSONArray args, JSONObject options) {
-    WXSDKInstance wxsdkInstance = WXSDKManager.getInstance()
-        .getSDKInstance(instanceId);
-    if (wxsdkInstance == null) {
-      return null;
-    }
-    if (wxsdkInstance.isNeedValidate()
-        && WXSDKManager.getInstance().getValidateProcessor() != null) {
-      WXValidateProcessor.WXModuleValidateResult validateResult = WXSDKManager
-          .getInstance().getValidateProcessor()
-          .onModuleValidate(wxsdkInstance, moduleStr, methodStr, args, options);
-      if (validateResult == null) {
+    public Object callModuleMethod(String instanceId, String moduleStr, String methodStr, JSONArray args, JSONObject options) {
+      WXSDKInstance wxsdkInstance = WXSDKManager.getInstance()
+              .getSDKInstance(instanceId);
+      if (wxsdkInstance == null) {
         return null;
       }
-      if (validateResult.isSuccess) {
-        return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr,
-            args);
-      } else {
-        JSONObject validateInfo = validateResult.validateInfo;
-        if (validateInfo != null) {
-          WXLogUtils.e("[WXBridgeManager] module validate fail. >>> " + validateInfo.toJSONString());
-        }
-        return validateInfo;
+      if (wxsdkInstance.isNeedValidate()
+              && WXSDKManager.getInstance().getValidateProcessor() != null) {
+          WXValidateProcessor.WXModuleValidateResult validateResult = WXSDKManager
+                  .getInstance().getValidateProcessor()
+                  .onModuleValidate(wxsdkInstance, moduleStr, methodStr, args, options);
+          if (validateResult == null) {
+              return null;
+          }
+          if (validateResult.isSuccess) {
+              return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr,
+                      args);
+          } else {
+              JSONObject validateInfo = validateResult.validateInfo;
+            if (validateInfo != null) {
+              WXLogUtils.e("[WXBridgeManager] module validate fail. >>> " + validateInfo.toJSONString());
+            }
+              return validateInfo;
+          }
       }
-    }
-    return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr, args);
+      return WXModuleManager.callModuleMethod(instanceId, moduleStr, methodStr, args);
   }
 
   /**
@@ -275,7 +282,6 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
   /**
    * Set current Instance
-   *
    * @param instanceId {@link WXSDKInstance#mInstanceId}
    */
   public synchronized void setStackTopInstance(final String instanceId) {
@@ -289,12 +295,12 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   }
 
   @Override
-  public void post(Runnable r) {
-    if (mInterceptor != null && mInterceptor.take(r)) {
+  public void post(Runnable r){
+    if(mInterceptor != null && mInterceptor.take(r)){
       //task is token by the interceptor
       return;
     }
-    if (mJSHandler == null) {
+    if (mJSHandler == null){
       return;
     }
 
@@ -327,15 +333,15 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     mJSHandler.sendMessageDelayed(message, timerInfo.time);
   }
 
-  public void sendMessageDelayed(Message message, long delayMillis) {
+  public void sendMessageDelayed(Message message, long delayMillis){
     if (message == null || mJSHandler == null || mJSThread == null
         || !mJSThread.isWXThreadAlive() || mJSThread.getLooper() == null) {
       return;
     }
-    mJSHandler.sendMessageDelayed(message, delayMillis);
+    mJSHandler.sendMessageDelayed(message,delayMillis);
   }
 
-  public void removeMessage(int what, Object obj) {
+  public void removeMessage(int what,Object obj){
     if (mJSHandler == null || mJSThread == null
         || !mJSThread.isWXThreadAlive() || mJSThread.getLooper() == null) {
       return;
@@ -343,97 +349,98 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     mJSHandler.removeMessages(what, obj);
   }
 
-  public Object callNativeModule(String instanceId, String module, String method, JSONArray arguments, Object options) {
+    public Object callNativeModule(String instanceId, String module, String method, JSONArray arguments, Object options) {
 
-    if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("[WXBridgeManager] callNativeModule >>>> instanceId:").append(instanceId)
-          .append(", module:").append(module).append(", method:").append(method).append(", arguments:").append(arguments);
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
-    }
-
-    try {
-      if (WXDomModule.WXDOM.equals(module)) {
-        WXDomModule dom = getDomModule(instanceId);
-        return dom.callDomMethod(method, arguments);
-      } else {
-        return callModuleMethod(instanceId, module,
-            method, arguments);
-      }
-    } catch (Exception e) {
-      WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
-    }
-
-    return null;
-  }
+        if (WXEnvironment.isApkDebugable()) {
+            mLodBuilder.append("[WXBridgeManager] callNativeModule >>>> instanceId:").append(instanceId)
+                    .append(", module:").append(module).append(", method:").append(method).append(", arguments:").append(arguments);
+            WXLogUtils.d(mLodBuilder.substring(0));
+            mLodBuilder.setLength(0);
+        }
 
-  public Object callNativeModule(String instanceId, String module, String method, JSONArray arguments, JSONObject options) {
+        try {
+            if(WXDomModule.WXDOM.equals(module)){
+              WXDomModule dom = getDomModule(instanceId);
+              return dom.callDomMethod(method,arguments);
+            }else {
+              return callModuleMethod(instanceId, module,
+                      method, arguments);
+            }
+        } catch (Exception e) {
+            WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
+            commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
+        }
 
-    if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("[WXBridgeManager] callNativeModule >>>> instanceId:").append(instanceId)
-          .append(", module:").append(module).append(", method:").append(method).append(", arguments:").append(arguments);
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
+        return null;
     }
+    public Object callNativeModule(String instanceId, String module,String method, JSONArray arguments, JSONObject options) {
 
-    try {
-      if (WXDomModule.WXDOM.equals(module)) {
-        WXDomModule dom = getDomModule(instanceId);
-        return dom.callDomMethod(method, arguments);
-      } else {
-        return callModuleMethod(instanceId, module,
-            method, arguments, options);
-      }
-    } catch (Exception e) {
-      WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
-    }
+        if (WXEnvironment.isApkDebugable()) {
+            mLodBuilder.append("[WXBridgeManager] callNativeModule >>>> instanceId:").append(instanceId)
+                    .append(", module:").append(module).append(", method:").append(method).append(", arguments:").append(arguments);
+            WXLogUtils.d(mLodBuilder.substring(0));
+            mLodBuilder.setLength(0);
+        }
 
-    return null;
-  }
+        try {
+            if(WXDomModule.WXDOM.equals(module)){
+              WXDomModule dom = getDomModule(instanceId);
+              return dom.callDomMethod(method,arguments);
+            }else {
+              return callModuleMethod(instanceId, module,
+                      method, arguments, options);
+            }
+        } catch (Exception e) {
+            WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
+            commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
+        }
 
-  public Object callNativeComponent(String instanceId, String componentRef, String method, JSONArray arguments, Object options) {
-    if (WXEnvironment.isApkDebugable()) {
-      mLodBuilder.append("[WXBridgeManager] callNativeComponent >>>> instanceId:").append(instanceId)
-          .append(", componentRef:").append(componentRef).append(", method:").append(method).append(", arguments:").append(arguments);
-      WXLogUtils.d(mLodBuilder.substring(0));
-      mLodBuilder.setLength(0);
+        return null;
     }
-    try {
 
-      WXDomModule dom = getDomModule(instanceId);
-      dom.invokeMethod(componentRef, method, arguments);
+    public Object callNativeComponent(String instanceId, String componentRef, String method, JSONArray arguments, Object options) {
+        if (WXEnvironment.isApkDebugable()) {
+            mLodBuilder.append("[WXBridgeManager] callNativeComponent >>>> instanceId:").append(instanceId)
+                    .append(", componentRef:").append(componentRef).append(", method:").append(method).append(", arguments:").append(arguments);
+            WXLogUtils.d(mLodBuilder.substring(0));
+            mLodBuilder.setLength(0);
+        }
+        try {
 
-    } catch (Exception e) {
-      WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
+            WXDomModule dom = getDomModule(instanceId);
+            dom.invokeMethod(componentRef, method, arguments);
+
+        } catch (Exception e) {
+            WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
+            commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNativeModule exception " + e.getCause());
+        }
+        return null;
     }
-    return null;
-  }
 
   /**
    * Dispatch the native task to be executed.
-   *
+     *
    * @param instanceId {@link WXSDKInstance#mInstanceId}
-   * @param tasks      tasks to be executed
-   * @param callback   next tick id
+   * @param tasks tasks to be executed
+   * @param callback next tick id
    */
   public int callNative(String instanceId, String tasks, String callback) {
     if (TextUtils.isEmpty(tasks)) {
-      WXLogUtils.e("[WXBridgeManager] callNative: call Native tasks is null");
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNative: call Native tasks is null");
+      if (WXEnvironment.isApkDebugable()) {
+        WXLogUtils.e("[WXBridgeManager] callNative: call Native tasks is null");
+      }
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,"[WXBridgeManager] callNative: call Native tasks is null");
       return IWXBridge.INSTANCE_RENDERING_ERROR;
     }
 
     // if (WXEnvironment.isApkDebugable()) {
-    mLodBuilder.append("[WXBridgeManager] callNative >>>> instanceId:").append(instanceId)
-        .append(", tasks:").append(tasks).append(", callback:").append(callback);
-    WXLogUtils.d(mLodBuilder.substring(0));
-    mLodBuilder.setLength(0);
+      mLodBuilder.append("[WXBridgeManager] callNative >>>> instanceId:").append(instanceId)
+          .append(", tasks:").append(tasks).append(", callback:").append(callback);
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
     // }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId!=null &&mDestroyedInstanceId.contains(instanceId)){
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -443,7 +450,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     JSONArray array = JSON.parseArray(tasks);
     parseNanos = System.nanoTime() - parseNanos;
 
-    if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
+    if(WXSDKManager.getInstance().getSDKInstance(instanceId)!=null) {
       WXSDKManager.getInstance().getSDKInstance(instanceId).jsonParseTime(System.currentTimeMillis() - start);
     }
 
@@ -455,27 +462,27 @@ public class WXBridgeManager implements Callback, BactchExecutor {
           task = (JSONObject) array.get(i);
           if (task != null && WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
             Object target = task.get(MODULE);
-            if (target != null) {
-              if (WXDomModule.WXDOM.equals(target)) {
+            if(target != null){
+              if(WXDomModule.WXDOM.equals(target)){
                 WXDomModule dom = getDomModule(instanceId);
-                dom.callDomMethod(task, parseNanos);
-              } else {
+                dom.callDomMethod(task,parseNanos);
+              }else {
                 JSONObject optionObj = task.getJSONObject(OPTIONS);
                 callModuleMethod(instanceId, (String) target,
-                    (String) task.get(METHOD), (JSONArray) task.get(ARGS), optionObj);
+                        (String) task.get(METHOD), (JSONArray) task.get(ARGS), optionObj);
               }
-            } else if (task.get(COMPONENT) != null) {
+            }else if(task.get(COMPONENT) != null){
               //call component
               WXDomModule dom = getDomModule(instanceId);
-              dom.invokeMethod((String) task.get(REF), (String) task.get(METHOD), (JSONArray) task.get(ARGS));
-            } else {
+              dom.invokeMethod((String) task.get(REF),(String) task.get(METHOD),(JSONArray) task.get(ARGS));
+            }else{
               throw new IllegalArgumentException("unknown callNative");
             }
           }
         }
       } catch (Exception e) {
         WXLogUtils.e("[WXBridgeManager] callNative exception: ", e);
-        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callNative exception " + e.getCause());
+        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,"[WXBridgeManager] callNative exception "+e.getCause());
       }
     }
 
@@ -491,21 +498,21 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   public int callCreateBody(String instanceId, String tasks, String callback) {
     if (TextUtils.isEmpty(tasks)) {
       // if (WXEnvironment.isApkDebugable()) {
-      WXLogUtils.d("[WXBridgeManager] callCreateBody: call CreateBody tasks is null");
+        WXLogUtils.d("[WXBridgeManager] callCreateBody: call CreateBody tasks is null");
       // }
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_CREATEBODY, "[WXBridgeManager] callCreateBody: call CreateBody tasks is null");
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_CREATEBODY,"[WXBridgeManager] callCreateBody: call CreateBody tasks is null");
       return IWXBridge.INSTANCE_RENDERING_ERROR;
     }
 
     // if (WXEnvironment.isApkDebugable()) {
-    mLodBuilder.append("[WXBridgeManager] callCreateBody >>>> instanceId:").append(instanceId)
-        .append(", tasks:").append(tasks).append(", callback:").append(callback);
-    WXLogUtils.d(mLodBuilder.substring(0));
-    mLodBuilder.setLength(0);
+      mLodBuilder.append("[WXBridgeManager] callCreateBody >>>> instanceId:").append(instanceId)
+              .append(", tasks:").append(tasks).append(", callback:").append(callback);
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
     // }
 
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)){
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -518,7 +525,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getCreateBody(domObject);
-        domModule.postAction((DOMAction) action, true);
+        domModule.postAction((DOMAction)action, true);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).mParseJsonNanos = nanosTemp;
@@ -527,8 +534,8 @@ public class WXBridgeManager implements Callback, BactchExecutor {
         }
       }
     } catch (Exception e) {
-      WXLogUtils.e("[WXBridgeManager] callCreateBody exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_CREATEBODY, "[WXBridgeManager] callCreateBody exception " + e.getCause());
+        WXLogUtils.e("[WXBridgeManager] callCreateBody exception: ", e);
+        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_CREATEBODY,"[WXBridgeManager] callCreateBody exception "+e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -544,12 +551,12 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   public int callUpdateFinish(String instanceId, String callback) {
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callUpdateFinish >>>> instanceId:").append(instanceId)
-          .append(", callback:").append(callback);
+              .append(", callback:").append(callback);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)){
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -557,11 +564,11 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getUpdateFinish();
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callUpdateFinish exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, "[WXBridgeManager] callUpdateFinish exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,"[WXBridgeManager] callUpdateFinish exception "+e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -575,13 +582,13 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   // callCreateFinish
   public int callCreateFinish(String instanceId, String callback) {
     // if (WXEnvironment.isApkDebugable()) {
-    mLodBuilder.append("[WXBridgeManager] callCreateFinish >>>> instanceId:").append(instanceId)
-        .append(", callback:").append(callback);
-    WXLogUtils.d(mLodBuilder.substring(0));
-    mLodBuilder.setLength(0);
+      mLodBuilder.append("[WXBridgeManager] callCreateFinish >>>> instanceId:").append(instanceId)
+              .append(", callback:").append(callback);
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
     // }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -589,11 +596,11 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getCreateFinish();
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callCreateFinish exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERROR_DOM_CREATEFINISH, "[WXBridgeManager] callCreateFinish exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERROR_DOM_CREATEFINISH,"[WXBridgeManager] callCreateFinish exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -609,12 +616,12 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   public int callRefreshFinish(String instanceId, String callback) {
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callRefreshFinish >>>> instanceId:").append(instanceId)
-          .append(", callback:").append(callback);
+              .append(", callback:").append(callback);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -622,11 +629,11 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getRefreshFinish();
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callRefreshFinish exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERROR_DOM_REFRESHFINISH, "[WXBridgeManager] callRefreshFinish exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERROR_DOM_REFRESHFINISH,"[WXBridgeManager] callRefreshFinish exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -641,20 +648,22 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   // callUpdateAttrs
   public int callUpdateAttrs(String instanceId, String ref, String task, String callback) {
     if (TextUtils.isEmpty(task)) {
-      WXLogUtils.e("[WXBridgeManager] callUpdateAttrs: call UpdateAttrs tasks is null");
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATEATTRS, "[WXBridgeManager] callUpdateAttrs: call UpdateAttrs tasks is null");
+      if (WXEnvironment.isApkDebugable()) {
+        WXLogUtils.e("[WXBridgeManager] callUpdateAttrs: call UpdateAttrs tasks is null");
+      }
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATEATTRS,"[WXBridgeManager] callUpdateAttrs: call UpdateAttrs tasks is null");
       return IWXBridge.INSTANCE_RENDERING_ERROR;
     }
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callUpdateAttrs >>>> instanceId:").append(instanceId)
-          .append(", ref:").append(ref)
-          .append(", task:").append(task)
-          .append(", callback:").append(callback);
+              .append(", ref:").append(ref)
+              .append(", task:").append(task)
+              .append(", callback:").append(callback);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -667,7 +676,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
         parseNanos = System.nanoTime() - parseNanos;
 
         Action action = Actions.getUpdateAttrs(ref, domObject);
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).mStartMillis = start;
@@ -677,7 +686,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callUpdateAttrs exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATEATTRS, "[WXBridgeManager] callUpdateAttrs exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATEATTRS,"[WXBridgeManager] callUpdateAttrs exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -692,20 +701,22 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   // callUpdateStyle
   public int callUpdateStyle(String instanceId, String ref, String task, String callback) {
     if (TextUtils.isEmpty(task)) {
-      WXLogUtils.e("[WXBridgeManager] callUpdateStyle: call UpdateStyle tasks is null");
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATESTYLE, "[WXBridgeManager] callUpdateStyle: call UpdateStyle tasks is null");
+      if (WXEnvironment.isApkDebugable()) {
+        WXLogUtils.e("[WXBridgeManager] callUpdateStyle: call UpdateStyle tasks is null");
+      }
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATESTYLE,"[WXBridgeManager] callUpdateStyle: call UpdateStyle tasks is null");
       return IWXBridge.INSTANCE_RENDERING_ERROR;
     }
-   if (WXEnvironment.isApkDebugable()) {
-    mLodBuilder.append("[WXBridgeManager] callUpdateStyle >>>> instanceId:").append(instanceId)
-        .append(", ref:").append(ref)
-        .append(", task:").append(task)
-        .append(", callback:").append(callback);
-    WXLogUtils.d(mLodBuilder.substring(0));
-    mLodBuilder.setLength(0);
-    }
+//    if (WXEnvironment.isApkDebugable()) {
+      mLodBuilder.append("[WXBridgeManager] callUpdateStyle >>>> instanceId:").append(instanceId)
+              .append(", ref:").append(ref)
+              .append(", task:").append(task)
+              .append(", callback:").append(callback);
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
+//    }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -718,7 +729,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
         nanosTemp = System.nanoTime() - nanosTemp;
 
         Action action = Actions.getUpdateStyle(ref, domObject, false);
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).mParseJsonNanos = nanosTemp;
@@ -728,7 +739,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callUpdateStyle exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATESTYLE, "[WXBridgeManager] callUpdateStyle exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_UPDATESTYLE,"[WXBridgeManager] callUpdateStyle exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -744,12 +755,12 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callRemoveElement >>>> instanceId:").append(instanceId)
-          .append(", ref:").append(ref);
+              .append(", ref:").append(ref);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -757,7 +768,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getRemoveElement(ref);
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).onStartDomExecute(instanceId, "removeElement", ref, null, ref);
@@ -765,7 +776,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callRemoveElement exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT, "[WXBridgeManager] callRemoveElement exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT,"[WXBridgeManager] callRemoveElement exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -781,14 +792,14 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callMoveElement >>>> instanceId:").append(instanceId)
-          .append(", parentref:").append(parentref)
-          .append(", index:").append(index)
-          .append(", ref:").append(ref);
+              .append(", parentref:").append(parentref)
+              .append(", index:").append(index)
+              .append(", ref:").append(ref);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -796,11 +807,11 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getMoveElement(ref, parentref, Integer.parseInt(index));
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callMoveElement exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_MOVEELEMENT, "[WXBridgeManager] callMoveElement exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_MOVEELEMENT,"[WXBridgeManager] callMoveElement exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -814,14 +825,14 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   public int callAddEvent(String instanceId, String ref, String event, String callback) {
 
 //    if (WXEnvironment.isApkDebugable()) {
-    mLodBuilder.append("[WXBridgeManager] callAddEvent >>>> instanceId:").append(instanceId)
-        .append(", ref:").append(ref)
-        .append(", event:").append(event);
-    WXLogUtils.d(mLodBuilder.substring(0));
-    mLodBuilder.setLength(0);
+      mLodBuilder.append("[WXBridgeManager] callAddEvent >>>> instanceId:").append(instanceId)
+              .append(", ref:").append(ref)
+              .append(", event:").append(event);
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
 //    }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -829,7 +840,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getAddEvent(ref, event);
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).onStartDomExecute(instanceId, "addEvent", ref, null, event);
@@ -837,7 +848,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callAddEvent exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_ADDEVENT, "[WXBridgeManager] callAddEvent exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_ADDEVENT,"[WXBridgeManager] callAddEvent exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -852,21 +863,21 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callRemoveEvent >>>> instanceId:").append(instanceId)
-          .append(", ref:").append(ref)
-          .append(", event:").append(event);
+              .append(", ref:").append(ref)
+              .append(", event:").append(event);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
-      return IWXBridge.DESTROY_INSTANCE;
+    if(mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+      return IWXBridge .DESTROY_INSTANCE;
     }
 
     try {
       if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
         WXDomModule domModule = getDomModule(instanceId);
         Action action = Actions.getRemoveEvent(ref, event);
-        domModule.postAction((DOMAction) action, false);
+        domModule.postAction((DOMAction)action, false);
 
         if (WXTracing.isAvailable() && action instanceof TraceableAction) {
           ((TraceableAction) action).onStartDomExecute(instanceId, "removeEvent", ref, null, event);
@@ -874,7 +885,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       }
     } catch (Exception e) {
       WXLogUtils.e("[WXBridgeManager] callRemoveEvent exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEEVENT, "[WXBridgeManager] callRemoveEvent exception " + e.getCause());
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_DOM_REMOVEEVENT,"[WXBridgeManager] callRemoveEvent exception " + e.getCause());
     }
 
     if (UNDEFINED.equals(callback) || NON_CALLBACK.equals(callback)) {
@@ -885,16 +896,16 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     return IWXBridge.INSTANCE_RENDERING;
   }
 
-  public int callAddElement(String instanceId, String ref, String dom, String index, String callback) {
+  public int callAddElement(String instanceId, String ref,String dom,String index, String callback){
 
     if (WXEnvironment.isApkDebugable()) {
       mLodBuilder.append("[WXBridgeManager] callNative::callAddElement >>>> instanceId:").append(instanceId)
-          .append(", ref:").append(ref).append(", dom:").append(dom).append(", callback:").append(callback);
+              .append(", ref:").append(ref).append(", dom:").append(dom).append(", callback:").append(callback);
       WXLogUtils.d(mLodBuilder.substring(0));
       mLodBuilder.setLength(0);
     }
 
-    if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+    if(mDestroyedInstanceId!=null && mDestroyedInstanceId.contains(instanceId)){
       return IWXBridge.DESTROY_INSTANCE;
     }
 
@@ -909,7 +920,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
         WXSDKManager.getInstance().getSDKInstance(instanceId).jsonParseTime(System.currentTimeMillis() - start);
       }
       WXDomModule domModule = getDomModule(instanceId);
-      DOMAction addElementAction = Actions.getAddElement(domObject, ref, Integer.parseInt(index));
+      DOMAction addElementAction = Actions.getAddElement(domObject, ref,Integer.parseInt(index));
       domModule.postAction(addElementAction, false);
 
       if (WXTracing.isAvailable() && addElementAction instanceof TraceableAction) {
@@ -929,57 +940,57 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   }
 
   public int callReportCrashReloadPage(String instanceId, String crashFile) {
-    try {
-      String url = null;
-      WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
-      if (instance != null) {
-        url = instance.getBundleUrl();
-      }
       try {
-        if (WXEnvironment.getApplication() != null) {
-          crashFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath() + crashFile;
-          // Log.e("jsengine", "callReportCrashReloadPage crashFile:" + crashFile);
+        String url = null;
+        WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
+        if (instance != null) {
+          url = instance.getBundleUrl();
         }
-      } catch (Throwable e) {
-        e.printStackTrace();
-      }
-      callReportCrash(crashFile, instanceId, url);
-      if (reInitCount > CRASHREINIT) {
-        return IWXBridge.INSTANCE_RENDERING_ERROR;
-      }
-      reInitCount++;
-      // reinit frame work
-      mInit = false;
-      initScriptsFramework("");
+        try {
+            if (WXEnvironment.getApplication() != null) {
+                crashFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath() + crashFile;
+                // Log.e("jsengine", "callReportCrashReloadPage crashFile:" + crashFile);
+            }
+        } catch (Throwable e) {
+            e.printStackTrace();
+        }
+        callReportCrash(crashFile, instanceId, url);
+        if (reInitCount > CRASHREINIT) {
+          return IWXBridge.INSTANCE_RENDERING_ERROR;
+        }
+        reInitCount++;
+        // reinit frame work
+        mInit = false;
+        initScriptsFramework("");
 
-      if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
-        return IWXBridge.DESTROY_INSTANCE;
+        if (mDestroyedInstanceId != null && mDestroyedInstanceId.contains(instanceId)) {
+          return IWXBridge.DESTROY_INSTANCE;
+        }
+      } catch (Exception e) {
+        WXLogUtils.e("[WXBridgeManager] callReportCrashReloadPage exception: ", e);
       }
-    } catch (Exception e) {
-      WXLogUtils.e("[WXBridgeManager] callReportCrashReloadPage exception: ", e);
-    }
-    try {
+      try {
 
-      if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
-        boolean reloadThisInstance = shouReloadCurrentInstance(
-            WXSDKManager.getInstance().getSDKInstance(instanceId).getBundleUrl());
-        WXDomModule domModule = getDomModule(instanceId);
-        Action action = Actions.getReloadPage(instanceId, reloadThisInstance);
-        domModule.postAction((DOMAction) action, true);
-      }
+          if (WXSDKManager.getInstance().getSDKInstance(instanceId) != null) {
+              boolean reloadThisInstance = shouReloadCurrentInstance(
+                      WXSDKManager.getInstance().getSDKInstance(instanceId).getBundleUrl());
+              WXDomModule domModule = getDomModule(instanceId);
+              Action action = Actions.getReloadPage(instanceId, reloadThisInstance);
+              domModule.postAction((DOMAction) action, true);
+          }
 
-    } catch (Exception e) {
-      WXLogUtils.e("[WXBridgeManager] callReloadPage exception: ", e);
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_RELOAD_PAGE, "[WXBridgeManager] callReloadPage exception " + e.getCause());
-    }
-    return IWXBridge.INSTANCE_RENDERING_ERROR;
+      } catch (Exception e) {
+          WXLogUtils.e("[WXBridgeManager] callReloadPage exception: ", e);
+          commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_RELOAD_PAGE,"[WXBridgeManager] callReloadPage exception "+e.getCause());
+      }
+      return IWXBridge.INSTANCE_RENDERING_ERROR;
   }
 
   public boolean shouReloadCurrentInstance(String aUrl) {
     long time = System.currentTimeMillis();
     if (crashUrl == null ||
-        (crashUrl != null && !crashUrl.equals(aUrl)) ||
-        ((time - lastCrashTime) > 15000)) {
+            (crashUrl != null && !crashUrl.equals(aUrl)) ||
+            ((time - lastCrashTime) > 15000)) {
       crashUrl = aUrl;
       lastCrashTime = time;
       return true;
@@ -989,46 +1000,49 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   }
 
   public void callReportCrash(String crashFile, final String instanceId, final String url) {
-    // statistic weexjsc process crash
-    Date date = new Date();
-    DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
-    String time = format.format(date);
-    final String origin_filename = crashFile + "." + time;
-    File oldfile = new File(crashFile);
-    File newfile = new File(origin_filename);
-    if (oldfile.exists()) {
-      oldfile.renameTo(newfile);
-    }
-    Thread t = new Thread(new Runnable() {
-      public void run() {
-        try {
-          File file = new File(origin_filename);
-          if (file.exists()) {
-            if (file.length() > 0) {
-              StringBuilder result = new StringBuilder();
+      // statistic weexjsc process crash
+      Date date = new Date();
+      DateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
+      String time = format.format(date);
+      final String origin_filename = crashFile + "." + time;
+      File oldfile = new File(crashFile);
+      File newfile = new File(origin_filename);
+      if (oldfile.exists()) {
+          oldfile.renameTo(newfile);
+      }
+      Thread t = new Thread(new Runnable() {
+           public void run() {
               try {
-                BufferedReader br = new BufferedReader(new FileReader(origin_filename));
-                String s = null;
-                // boolean foundStart = false;
-                while ((s = br.readLine()) != null) {
-                  if ("".equals(s)) {
-                    continue;
+                File file = new File(origin_filename);
+                if (file.exists()) {
+                  if (file.length() > 0) {
+                    StringBuilder result = new StringBuilder();
+                    try{
+                      BufferedReader br = new BufferedReader(new FileReader(origin_filename));
+                      String s = null;
+                      // boolean foundStart = false;
+                      while((s = br.readLine()) != null) {
+                        if ("".equals(s)) {
+                          continue;
+                        }
+                        // 寄存器内容裁剪
+                        // if (("r0:").equals(s)) {
+                        //  break;
+                        // }
+                        result.append(s + "\n");
+                      }
+                      commitJscCrashAlarmMonitor(IWXUserTrackAdapter.JS_BRIDGE,  WXErrorCode.WX_ERR_JSC_CRASH, result.toString(), instanceId, url);
+                      br.close();
+                    } catch(Exception e) {
+                      e.printStackTrace();
+                    }
+                  } else {
+                    WXLogUtils.e("[WXBridgeManager] callReportCrash crash file is empty");
+                    // 没收集到crash堆栈不上传
+                    // commitJscCrashAlarmMonitor(IWXUserTrackAdapter.JS_BRIDGE,  WXErrorCode.WX_ERR_JSC_CRASH, "crash info file empty", instanceId, url);
                   }
-                  // if (("r0:").equals(s)) {
-                  //  break;
-                  // }
-                  result.append(s + "\n");
+                  file.delete();
                 }
-                commitJscCrashAlarmMonitor(IWXUserTrackAdapter.JS_BRIDGE, WXErrorCode.WX_ERR_JSC_CRASH, result.toString(), instanceId, url);
-                br.close();
-              } catch (Exception e) {
-                e.printStackTrace();
-              }
-            } else {
-              WXLogUtils.e("[WXBridgeManager] callReportCrash crash file is empty");
-            }
-            file.delete();
-          }
 //                  Log.e("reportServerCrash", "WXBridge reportServerCrash crashFile:" + origin_filename);
 //                  String filename = CRASHPATH;
 //                  File oldfile = new File(origin_filename);
@@ -1055,17 +1069,17 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 //                  } else {
 //                      Log.e("reportServerCrash", "WXBridge /data/data/com.taobao.taobao/app_tombstone/com.taobao.taobao/crashsdk/logs not exsist");
 //                  }
-        } catch (Throwable throwable) {
-          WXLogUtils.e("[WXBridgeManager] callReportCrash exception: ", throwable);
-        }
-      }
-    });
-    t.start();
+              } catch (Throwable throwable) {
+                  WXLogUtils.e("[WXBridgeManager] callReportCrash exception: ", throwable);
+              }
+          }
+      });
+      t.start();
 
   }
 
   private void getNextTick(final String instanceId, final String callback) {
-    addJSTask(METHOD_CALLBACK, instanceId, callback, "{}");
+    addJSTask(METHOD_CALLBACK,instanceId, callback, "{}");
     sendMessage(instanceId, WXJSBridgeMsgType.CALL_JS_BATCH);
   }
 
@@ -1080,12 +1094,12 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
         ArrayList<Object> argsList = new ArrayList<>();
         for (Object arg : args) {
-          argsList.add(arg);
+            argsList.add(arg);
         }
-        if (params != null) {
-          ArrayMap map = new ArrayMap(4);
-          map.put(KEY_PARAMS, params);
-          argsList.add(map);
+        if(params != null){
+           ArrayMap map = new ArrayMap(4);
+           map.put(KEY_PARAMS, params);
+           argsList.add(map);
         }
 
         WXHashMap<String, Object> task = new WXHashMap<>();
@@ -1117,7 +1131,6 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
   /**
    * Initialize JavaScript framework
-   *
    * @param framework String representation of the framework to be init.
    */
   public synchronized void initScriptsFramework(String framework) {
@@ -1130,13 +1143,12 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
   @Deprecated
   public void fireEvent(final String instanceId, final String ref,
-                        final String type, final Map<String, Object> data) {
+                        final String type, final Map<String, Object> data){
     this.fireEvent(instanceId, ref, type, data, null);
   }
 
   /**
    * Do not direct invoke this method in Components, use {@link WXSDKInstance#fireEvent(String, String, Map, Map)} instead.
-   *
    * @param instanceId
    * @param ref
    * @param type
@@ -1145,16 +1157,16 @@ public class WXBridgeManager implements Callback, BactchExecutor {
    */
   @Deprecated
   public void fireEvent(final String instanceId, final String ref,
-                        final String type, final Map<String, Object> data, final Map<String, Object> domChanges) {
-    fireEventOnNode(instanceId, ref, type, data, domChanges);
+                        final String type, final Map<String, Object> data,final Map<String, Object> domChanges) {
+    fireEventOnNode(instanceId,ref,type,data,domChanges);
   }
 
   /**
    * Notify the JavaScript about the event happened on Android
    */
   public void fireEventOnNode(final String instanceId, final String ref,
-                              final String type, final Map<String, Object> data, final Map<String, Object> domChanges) {
-    fireEventOnNode(instanceId, ref, type, data, domChanges, null);
+                        final String type, final Map<String, Object> data,final Map<String, Object> domChanges) {
+      fireEventOnNode(instanceId, ref, type, data, domChanges, null);
   }
 
   /**
@@ -1164,12 +1176,12 @@ public class WXBridgeManager implements Callback, BactchExecutor {
                               final String type, final Map<String, Object> data,
                               final Map<String, Object> domChanges, List<Object> params) {
     if (TextUtils.isEmpty(instanceId) || TextUtils.isEmpty(ref)
-        || TextUtils.isEmpty(type) || mJSHandler == null) {
+            || TextUtils.isEmpty(type) || mJSHandler == null) {
       return;
     }
     if (!checkMainThread()) {
       throw new WXRuntimeException(
-          "fireEvent must be called by main thread");
+              "fireEvent must be called by main thread");
     }
     addJSEventTask(METHOD_FIRE_EVENT, instanceId, params, ref, type, data, domChanges);
     sendMessage(instanceId, WXJSBridgeMsgType.CALL_JS_BATCH);
@@ -1182,12 +1194,11 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
   /**
    * Invoke JavaScript callback. Use {@link JSCallback} instead.
-   *
    * @see #callback(String, String, String)
    */
   @Deprecated
-  public void callback(String instanceId, String callback, String data) {
-    callback(instanceId, callback, data, false);
+  public void callback(String instanceId, String callback,String data) {
+    callback(instanceId, callback,data,false);
   }
 
   /**
@@ -1195,31 +1206,29 @@ public class WXBridgeManager implements Callback, BactchExecutor {
    */
   @Deprecated
   public void callback(final String instanceId, final String callback,
-                       final Map<String, Object> data) {
-    callback(instanceId, callback, data, false);
+                       final Map<String, Object> data){
+    callback(instanceId,callback,data,false);
   }
 
   /**
    * Use {@link JSCallback} instead.
-   *
    * @param instanceId Weex Instance Id
-   * @param callback   callback referenece handle
-   * @param data       callback data
-   * @param keepAlive  if keep callback instance alive for later use
-   */
+   * @param callback  callback referenece handle
+   * @param data callback data
+   * @param keepAlive if keep callback instance alive for later use
+     */
   @Deprecated
   public void callback(final String instanceId, final String callback,
-                       final Object data, boolean keepAlive) {
-    callbackJavascript(instanceId, callback, data, keepAlive);
+                       final Object data,boolean keepAlive) {
+    callbackJavascript(instanceId,callback,data,keepAlive);
   }
 
   /**
    * Callback to Javascript function.
-   *
    * @param instanceId Weex Instance Id
-   * @param callback   callback referenece handle
-   * @param data       callback data
-   * @param keepAlive  if keep callback instance alive for later use
+   * @param callback  callback referenece handle
+   * @param data callback data
+   * @param keepAlive if keep callback instance alive for later use
    */
   void callbackJavascript(final String instanceId, final String callback,
                           final Object data, boolean keepAlive) {
@@ -1228,7 +1237,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       return;
     }
 
-    addJSTask(METHOD_CALLBACK, instanceId, callback, data, keepAlive);
+    addJSTask(METHOD_CALLBACK, instanceId, callback, data,keepAlive);
     sendMessage(instanceId, WXJSBridgeMsgType.CALL_JS_BATCH);
   }
 
@@ -1253,32 +1262,32 @@ public class WXBridgeManager implements Callback, BactchExecutor {
         WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
         if (instance != null) {
           instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR,
-              "createInstance failed!");
+                                 "createInstance failed!");
         }
         String err = "[WXBridgeManager] invokeRefreshInstance: framework.js uninitialized.";
-        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
+        commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
         WXLogUtils.d(err);
         return;
       }
       long start = System.currentTimeMillis();
       if (WXEnvironment.isApkDebugable()) {
         WXLogUtils.d("refreshInstance >>>> instanceId:" + instanceId
-            + ", data:" + refreshData.data + ", isDirty:" + refreshData.isDirty);
+                     + ", data:" + refreshData.data + ", isDirty:" + refreshData.isDirty);
       }
 
       if (refreshData.isDirty) {
         return;
       }
       WXJSObject instanceIdObj = new WXJSObject(WXJSObject.String,
-          instanceId);
+                                                instanceId);
       WXJSObject dataObj = new WXJSObject(WXJSObject.JSON,
-          refreshData.data == null ? "{}" : refreshData.data);
+                                          refreshData.data == null ? "{}" : refreshData.data);
       WXJSObject[] args = {instanceIdObj, dataObj};
       invokeExecJS(instanceId, null, METHOD_REFRESH_INSTANCE, args);
       WXLogUtils.renderPerformanceLog("invokeRefreshInstance", System.currentTimeMillis() - start);
     } catch (Throwable e) {
       String err = "[WXBridgeManager] invokeRefreshInstance " + e.getCause();
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
       WXLogUtils.e(err);
     }
   }
@@ -1298,11 +1307,11 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       return;
     }
     WXPerformance performance = new WXPerformance();
-    performance.args = instance.getBundleUrl();
-    performance.errCode = errCode.getErrorCode();
+    performance.args=instance.getBundleUrl();
+    performance.errCode=errCode.getErrorCode();
     if (errCode != WXErrorCode.WX_SUCCESS) {
-      performance.appendErrMsg(TextUtils.isEmpty(errMsg) ? errCode.getErrorMsg() : errMsg);
-      WXLogUtils.e("wx_monitor", performance.toString());
+      performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errCode.getErrorMsg():errMsg);
+      WXLogUtils.e("wx_monitor",performance.toString());
     }
     adapter.commit(WXEnvironment.getApplication(), null, IWXUserTrackAdapter.JS_BRIDGE, performance, instance.getUserTrackParams());
   }
@@ -1324,8 +1333,8 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     WXPerformance performance = new WXPerformance();
     performance.errCode = errorCode.getErrorCode();
     if (errorCode != WXErrorCode.WX_SUCCESS) {
-      performance.appendErrMsg(TextUtils.isEmpty(errMsg) ? errorCode.getErrorMsg() : errMsg);
-      WXLogUtils.e("wx_monitor", performance.toString());
+      performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errorCode.getErrorMsg():errMsg);
+      WXLogUtils.e("wx_monitor",performance.toString());
     }
     userTrackAdapter.commit(WXEnvironment.getApplication(), null, type, performance, null);
   }
@@ -1339,15 +1348,15 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
     String method = "callReportCrash";
     String exception = "weexjsc process crash and restart exception";
-    Map<String, String> extParams = new HashMap<String, String>();
+    Map<String,String> extParams = new HashMap<String, String>();
     extParams.put("jscCrashStack", errMsg);
     IWXJSExceptionAdapter adapter = WXSDKManager.getInstance().getIWXJSExceptionAdapter();
     if (adapter != null) {
-      WXJSExceptionInfo jsException = new WXJSExceptionInfo(instanceId, url, errorCode.getErrorCode(), method, exception, extParams);
-      adapter.onJSException(jsException);
-      // if (WXEnvironment.isApkDebugable()) {
-      WXLogUtils.e(jsException.toString());
-      // }
+        WXJSExceptionInfo jsException = new WXJSExceptionInfo(instanceId, url, errorCode.getErrorCode(), method, exception, extParams);
+        adapter.onJSException(jsException);
+        // if (WXEnvironment.isApkDebugable()) {
+          WXLogUtils.e(jsException.toString());
+        // }
     }
   }
 
@@ -1357,27 +1366,15 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   public void createInstance(final String instanceId, final String template,
                              final Map<String, Object> options, final String data) {
     final WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
-    if (instance == null) {
-      WXLogUtils.e("WXBridgeManager", "createInstance failed, SDKInstance is not exist");
+    if(instance == null){
+      WXLogUtils.e("WXBridgeManager","createInstance failed, SDKInstance is not exist");
       return;
     }
-    if (TextUtils.isEmpty(instanceId)
+    if ( TextUtils.isEmpty(instanceId)
         || TextUtils.isEmpty(template) || mJSHandler == null) {
       instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR, "createInstance fail!");
       return;
     }
-
-    if (!isJSFrameworkInit() && reInitCount == 1) {
-      instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR, "createInstance fail!");
-      post(new Runnable() {
-        @Override
-        public void run() {
-          initFramework("");
-        }
-      }, instanceId);
-      return;
-    }
-
     WXModuleManager.createDomModule(instance);
     post(new Runnable() {
       @Override
@@ -1389,7 +1386,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
           @Override
           public void run() {
-            instance.createInstanceFinished(totalTime);
+              instance.createInstanceFinished(totalTime);
           }
         }, 0);
       }
@@ -1406,37 +1403,37 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     } else {
       if (!isJSFrameworkInit()) {
         instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR, "createInstance "
-            + "fail!");
+                                                                             + "fail!");
         String err = "[WXBridgeManager] invokeCreateInstance: framework.js uninitialized.";
-        commitJSBridgeAlarmMonitor(instance.getInstanceId(), WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
+        commitJSBridgeAlarmMonitor(instance.getInstanceId(), WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
         WXLogUtils.e(err);
         return;
       }
       try {
         if (WXEnvironment.isApkDebugable()) {
           WXLogUtils.d("createInstance >>>> instanceId:" + instance.getInstanceId()
-              + ", options:"
-              + WXJsonUtils.fromObjectToJSONString(options)
-              + ", data:" + data);
+                       + ", options:"
+                       + WXJsonUtils.fromObjectToJSONString(options)
+                       + ", data:" + data);
         }
         WXJSObject instanceIdObj = new WXJSObject(WXJSObject.String,
-            instance.getInstanceId());
+                instance.getInstanceId());
         WXJSObject instanceObj = new WXJSObject(WXJSObject.String,
-            template);
+                                                template);
         WXJSObject optionsObj = new WXJSObject(WXJSObject.JSON,
-            options == null ? "{}"
-                : WXJsonUtils.fromObjectToJSONString(options));
+                options == null ? "{}"
+                        : WXJsonUtils.fromObjectToJSONString(options));
         WXJSObject dataObj = new WXJSObject(WXJSObject.JSON,
-            data == null ? "{}" : data);
+                data == null ? "{}" : data);
         WXJSObject[] args = {instanceIdObj, instanceObj, optionsObj,
-            dataObj};
-        invokeExecJS(instance.getInstanceId(), null, METHOD_CREATE_INSTANCE, args, false);
+                dataObj};
+        invokeExecJS(instance.getInstanceId(), null, METHOD_CREATE_INSTANCE, args,false);
       } catch (Throwable e) {
         instance.onRenderError(WXRenderErrorCode.WX_CREATE_INSTANCE_ERROR,
-            "createInstance failed!");
+                                 "createInstance failed!");
         String err = "[WXBridgeManager] invokeCreateInstance " + e.getCause()
-            + " template md5 " + WXFileUtils.md5(template) + " length " + (template == null ? 0 : template.length());
-        commitJSBridgeAlarmMonitor(instance.getInstanceId(), WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
+                + " template md5 " + WXFileUtils.md5(template) + " length " + (template == null ? 0 : template.length());
+        commitJSBridgeAlarmMonitor(instance.getInstanceId(), WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
         WXLogUtils.e(err);
       }
     }
@@ -1447,11 +1444,11 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   }
 
   public void destroyInstance(final String instanceId) {
-    if (mJSHandler == null
+    if ( mJSHandler == null
         || TextUtils.isEmpty(instanceId)) {
       return;
     }
-    if (mDestroyedInstanceId != null) {
+    if(mDestroyedInstanceId!=null) {
       mDestroyedInstanceId.add(instanceId);
     }
     // clear message with instanceId
@@ -1475,12 +1472,12 @@ public class WXBridgeManager implements Callback, BactchExecutor {
         WXLogUtils.d("destroyInstance >>>> instanceId:" + instanceId);
       }
       WXJSObject instanceIdObj = new WXJSObject(WXJSObject.String,
-          instanceId);
+                                                instanceId);
       WXJSObject[] args = {instanceIdObj};
       invokeExecJS(instanceId, null, METHOD_DESTROY_INSTANCE, args);
     } catch (Throwable e) {
       String err = "[WXBridgeManager] invokeDestroyInstance " + e.getCause();
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE, err);
+      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_INVOKE_NATIVE,err);
       WXLogUtils.e(err);
     }
   }
@@ -1501,7 +1498,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
         break;
       case WXJSBridgeMsgType.SET_TIMEOUT:
         TimerInfo timerInfo = (TimerInfo) msg.obj;
-        if (timerInfo == null) {
+        if(timerInfo == null){
           break;
         }
         WXJSObject obj = new WXJSObject(WXJSObject.String, timerInfo.callbackId);
@@ -1525,14 +1522,14 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   }
 
   public void invokeExecJS(String instanceId, String namespace, String function,
-                           WXJSObject[] args, boolean logTaskDetail) {
+                            WXJSObject[] args,boolean logTaskDetail){
     // if (WXEnvironment.isApkDebugable()) {
-    mLodBuilder.append("callJS >>>> instanceId:").append(instanceId)
-        .append("function:").append(function);
-    if (logTaskDetail)
-      mLodBuilder.append(" tasks:").append(WXJsonUtils.fromObjectToJSONString(args));
-    WXLogUtils.d(mLodBuilder.substring(0));
-    mLodBuilder.setLength(0);
+      mLodBuilder.append("callJS >>>> instanceId:").append(instanceId)
+              .append("function:").append(function);
+      if(logTaskDetail)
+        mLodBuilder.append(" tasks:").append(WXJsonUtils.fromObjectToJSONString(args));
+      WXLogUtils.d(mLodBuilder.substring(0));
+      mLodBuilder.setLength(0);
     // }
     mWXBridge.execJS(instanceId, namespace, function, args);
   }
@@ -1543,16 +1540,16 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       framework = (String) msg.obj;
     }
 
-    if (WXUtils.getAvailMemory(WXEnvironment.getApplication()) > LOW_MEM_VALUE) {
+    if(WXUtils.getAvailMemory(WXEnvironment.getApplication()) > LOW_MEM_VALUE) {
       initFramework(framework);
     }
   }
 
-  private void initFramework(String framework) {
+  private void initFramework(String framework){
     if (!isJSFrameworkInit()) {
       if (TextUtils.isEmpty(framework)) {
         // if (WXEnvironment.isApkDebugable()) {
-        WXLogUtils.d("weex JS framework from assets");
+          WXLogUtils.d("weex JS framework from assets");
         // }
         framework = WXFileUtils.loadAsset("main.js", WXEnvironment.getApplication());
       }
@@ -1567,23 +1564,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
         }
 
         long start = System.currentTimeMillis();
-        String crashFile = "";
-        try {
-          crashFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath();
-        } catch (Exception e) {
-          e.printStackTrace();
-        }
-        boolean pieSupport = true;
-        try {
-          if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
-            pieSupport = false;
-          }
-        } catch (Exception e) {
-          e.printStackTrace();
-        }
-        WXLogUtils.d("[WXBridgeManager] initFrameworkEnv crashFile:" + crashFile + " pieSupport:" + pieSupport);
-        // extends initFramework
-        if (mWXBridge.initFrameworkEnv(framework, assembleDefaultOptions(), crashFile, pieSupport) == INIT_FRAMEWORK_OK) {
+        if(mWXBridge.initFramework(framework, assembleDefaultOptions())==INIT_FRAMEWORK_OK){
           WXEnvironment.sJSLibInitTime = System.currentTimeMillis() - start;
           WXLogUtils.renderPerformanceLog("initFramework", WXEnvironment.sJSLibInitTime);
           WXEnvironment.sSDKInitTime = System.currentTimeMillis() - WXEnvironment.sSDKInitStart;
@@ -1602,25 +1583,25 @@ public class WXBridgeManager implements Callback, BactchExecutor {
             reinitInfo = "reinit Framework:";
           }
           commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_SUCCESS, reinitInfo + "success");
-        } else {
+        }else{
           if (reInitCount > 1) {
             WXLogUtils.e("[WXBridgeManager] invokeReInitFramework  ExecuteJavaScript fail");
-            String err = "[WXBridgeManager] invokeReInitFramework  ExecuteJavaScript fail reinit FrameWork";
+            String err="[WXBridgeManager] invokeReInitFramework  ExecuteJavaScript fail reinit FrameWork";
             commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_REINIT_FRAMEWORK, err);
           } else {
             WXLogUtils.e("[WXBridgeManager] invokeInitFramework  ExecuteJavaScript fail");
-            String err = "[WXBridgeManager] invokeInitFramework  ExecuteJavaScript fail";
+            String err="[WXBridgeManager] invokeInitFramework  ExecuteJavaScript fail";
             commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_FRAMEWORK, err);
           }
         }
       } catch (Throwable e) {
         if (reInitCount > 1) {
           WXLogUtils.e("[WXBridgeManager] invokeInitFramework ", e);
-          String err = "[WXBridgeManager] invokeInitFramework reinit FrameWork exception!#" + e.toString();
+          String err="[WXBridgeManager] invokeInitFramework reinit FrameWork exception!#"+e.toString();
           commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_REINIT_FRAMEWORK, err);
         } else {
           WXLogUtils.e("[WXBridgeManager] invokeInitFramework ", e);
-          String err = "[WXBridgeManager] invokeInitFramework exception!#" + e.toString();
+          String err="[WXBridgeManager] invokeInitFramework exception!#"+e.toString();
           commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_FRAMEWORK, err);
         }
       }
@@ -1632,7 +1613,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
   private void invokeCallJSBatch(Message message) {
     if (mNextTickTasks.isEmpty() || !isJSFrameworkInit()) {
       if (!isJSFrameworkInit()) {
-        WXLogUtils.e("[WXBridgeManager] invokeCallJSBatch: framework.js uninitialized!!  message:" + message.toString());
+        WXLogUtils.e("[WXBridgeManager] invokeCallJSBatch: framework.js uninitialized!!  message:"+message.toString());
       }
       return;
     }
@@ -1653,16 +1634,16 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       task = ((ArrayList) task).toArray();
 
       WXJSObject[] args = {
-          new WXJSObject(WXJSObject.String, instanceId),
-          new WXJSObject(WXJSObject.JSON,
-              WXJsonUtils.fromObjectToJSONString(task))};
+              new WXJSObject(WXJSObject.String, instanceId),
+              new WXJSObject(WXJSObject.JSON,
+                      WXJsonUtils.fromObjectToJSONString(task))};
 
       invokeExecJS(String.valueOf(instanceId), null, METHOD_CALL_JS, args);
 
     } catch (Throwable e) {
       WXLogUtils.e("WXBridgeManager", e);
-      String err = "invokeCallJSBatch#" + e.toString();
-      commitJSBridgeAlarmMonitor(message.obj.toString(), WXErrorCode.WX_ERR_JS_EXECUTE, err);
+      String err="invokeCallJSBatch#"+e.toString();
+      commitJSBridgeAlarmMonitor(message.obj.toString(), WXErrorCode.WX_ERR_JS_EXECUTE,err);
     }
 
     // If task is not empty, loop until it is empty
@@ -1734,16 +1715,16 @@ public class WXBridgeManager implements Callback, BactchExecutor {
 
   /**
    * Register Android module
-   *
    * @param modules the format is like
    *                {'dom':['updateAttrs','updateStyle'],'event':['openUrl']}
    */
 
   public void registerModules(final Map<String, Object> modules) {
     if (modules != null && modules.size() != 0) {
-      if (isJSThread()) {
+      if(isJSThread()){
         invokeRegisterModules(modules, mRegisterModuleFailList);
-      } else {
+      }
+      else{
         post(new Runnable() {
           @Override
           public void run() {
@@ -1758,7 +1739,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
    * Registered component
    */
   public void registerComponents(final List<Map<String, Object>> components) {
-    if (mJSHandler == null || components == null
+    if ( mJSHandler == null || components == null
         || components.size() == 0) {
       return;
     }
@@ -1789,7 +1770,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       mWXBridge.execJSService(service);
     } catch (Throwable e) {
       WXLogUtils.e("[WXBridgeManager] invokeRegisterService:", e);
-      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_EXECUTE, "invokeRegisterService");
+      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK,WXErrorCode.WX_ERR_JS_EXECUTE,"invokeRegisterService");
     }
   }
 
@@ -1807,38 +1788,38 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     }
 
     WXJSObject[] args = {new WXJSObject(WXJSObject.JSON,
-        WXJsonUtils.fromObjectToJSONString(modules))};
+                                        WXJsonUtils.fromObjectToJSONString(modules))};
     try {
       mWXBridge.execJS("", null, METHOD_REGISTER_MODULES, args);
     } catch (Throwable e) {
       WXLogUtils.e("[WXBridgeManager] invokeRegisterModules:", e);
-      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_EXECUTE, "invokeRegisterModules");
+      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK,WXErrorCode.WX_ERR_JS_EXECUTE,"invokeRegisterModules");
     }
   }
 
   private void invokeRegisterComponents(List<Map<String, Object>> components, List<Map<String, Object>> failReceiver) {
-    if (components == failReceiver) {
+    if(components == failReceiver){
       throw new RuntimeException("Fail receiver should not use source.");
     }
     if (!isJSFrameworkInit()) {
       WXLogUtils.e("[WXBridgeManager] invokeRegisterComponents: framework.js uninitialized.");
 
-      for (Map<String, Object> comp : components) {
+      for (Map<String,Object> comp:components){
         failReceiver.add(comp);
       }
       return;
     }
-    if (components == null) {
+    if(components == null){
       return;
     }
 
     WXJSObject[] args = {new WXJSObject(WXJSObject.JSON,
-        WXJsonUtils.fromObjectToJSONString(components))};
+                                        WXJsonUtils.fromObjectToJSONString(components))};
     try {
       mWXBridge.execJS("", null, METHOD_REGISTER_COMPONENTS, args);
     } catch (Throwable e) {
       WXLogUtils.e("[WXBridgeManager] invokeRegisterComponents ", e);
-      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK, WXErrorCode.WX_ERR_JS_EXECUTE, "invokeRegisterComponents");
+      commitJSFrameworkAlarmMonitor(IWXUserTrackAdapter.JS_FRAMEWORK,WXErrorCode.WX_ERR_JS_EXECUTE,"invokeRegisterComponents");
     }
   }
 
@@ -1847,7 +1828,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       mJSThread.quit();
     }
     mBridgeManager = null;
-    if (mDestroyedInstanceId != null) {
+    if(mDestroyedInstanceId!=null){
       mDestroyedInstanceId.clear();
     }
 
@@ -1858,98 +1839,105 @@ public class WXBridgeManager implements Callback, BactchExecutor {
    */
   public void reportJSException(String instanceId, String function,
                                 String exception) {
-    WXLogUtils.e("reportJSException >>>> instanceId:" + instanceId
-        + ", exception function:" + function + ", exception:"
-        + exception);
-    WXSDKInstance instance = null;
-    if (instanceId != null && (instance = WXSDKManager.getInstance().getSDKInstance(instanceId)) != null) {
-      instance.onJSException(WXErrorCode.WX_ERR_JS_EXECUTE.getErrorCode(), function, exception);
-
-      if (METHOD_CREATE_INSTANCE.equals(function)) {
-        try {
-          if (reInitCount > 1 && !instance.isNeedReLoad()) {
-            // JSONObject domObject = JSON.parseObject(tasks);
-            WXDomModule domModule = getDomModule(instanceId);
-            Action action = Actions.getReloadPage(instanceId, true);
-            domModule.postAction((DOMAction) action, true);
-            instance.setNeedLoad(true);
-            return;
+      WXLogUtils.e("reportJSException >>>> instanceId:" + instanceId
+              + ", exception function:" + function + ", exception:"
+              + exception);
+	  WXSDKInstance instance = null;
+      if (instanceId != null && (instance = WXSDKManager.getInstance().getSDKInstance(instanceId)) != null) {
+          instance.onJSException(WXErrorCode.WX_ERR_JS_EXECUTE.getErrorCode(), function, exception);
+
+          if (METHOD_CREATE_INSTANCE.equals(function)) {
+              try {
+                  if (reInitCount > 1 && !instance.isNeedReLoad()) {
+                      // JSONObject domObject = JSON.parseObject(tasks);
+                      WXDomModule domModule = getDomModule(instanceId);
+                      Action action = Actions.getReloadPage(instanceId, true);
+                      domModule.postAction((DOMAction) action, true);
+                      instance.setNeedLoad(true);
+                      return;
+                  }
+              } catch (Exception e) {
+                  e.printStackTrace();
+              }
           }
-        } catch (Exception e) {
-          e.printStackTrace();
-        }
+          String err = "function:" + function + "#exception:" + exception;
+          commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_JS_EXECUTE, err);
       }
-      String err = "function:" + function + "#exception:" + exception;
-      commitJSBridgeAlarmMonitor(instanceId, WXErrorCode.WX_ERR_JS_EXECUTE, err);
-    }
 
-    IWXJSExceptionAdapter adapter = WXSDKManager.getInstance().getIWXJSExceptionAdapter();
-    if (adapter != null) {
-      String bundleUrl;
-      String exceptionId = instanceId;
+      IWXJSExceptionAdapter adapter = WXSDKManager.getInstance().getIWXJSExceptionAdapter();
+      if (adapter != null) {
+          String bundleUrl;
+          String exceptionId = instanceId;
 
-      if (instanceId == "" || instanceId == null) {
-        exceptionId = "instanceIdisNull";
-      }
+          if (instanceId == "" || instanceId == null) {
+              exceptionId = "instanceIdisNull";
+          }
 
-      if (instance == null) {
-        if (("initFramework").equals(function)) {
-          bundleUrl = "jsExceptionBeforeRenderInstanceNull";
-          String exceptionExt = null;
-          try {
-            if (WXEnvironment.getApplication() != null) {
-              final String fileName = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath() + INITLOGFILE;
-              try {
-                File file = new File(fileName);
-                if (file.exists()) {
-                  if (file.length() > 0) {
-                    StringBuilder result = new StringBuilder();
-                    try {
-                      InputStreamReader read = new InputStreamReader(new FileInputStream(file), "UTF-8");
-                      BufferedReader br = new BufferedReader(read);
-                      String s = null;
-                      while ((s = br.readLine()) != null) {
-                        result.append(s + "\n");
+          if (instance == null) {
+              if (("initFramework").equals(function)) {
+                  bundleUrl = "jsExceptionBeforeRenderInstanceNull";
+                  String exceptionExt = null;
+                  try {
+                      if (WXEnvironment.getApplication() != null) {
+                          final String fileName = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath() + INITLOGFILE;
+                          try {
+                              File file = new File(fileName);
+                              if (file.exists()) {
+                                  if (file.length() > 0) {
+                                      StringBuilder result = new StringBuilder();
+                                      try {
+                                          InputStreamReader read = new InputStreamReader(new FileInputStream(file), "UTF-8");
+                                          BufferedReader br = new BufferedReader(read);
+                                          String s = null;
+                                          while ((s = br.readLine()) != null) {
+                                              result.append(s + "\n");
+                                          }
+                                          exceptionExt = result.toString();
+                                          br.close();
+                                      } catch (Exception e) {
+                                          e.printStackTrace();
+                                      }
+                                  }
+                                  file.delete();
+                              }
+                          } catch (Throwable throwable) {
+
+                          }
                       }
-                      exceptionExt = result.toString();
-                      br.close();
-                    } catch (Exception e) {
+                  } catch (Throwable e) {
                       e.printStackTrace();
-                    }
                   }
-                  file.delete();
-                }
-              } catch (Throwable throwable) {
+                  exception += "\n" + exceptionExt;
+                  WXLogUtils.e("reportJSException:" + exception);
 
+              } else if (function == null) {
+                  bundleUrl = "jsExceptionInstanceAndFunctionNull";
+              } else {
+                  bundleUrl = "jsExceptionInstanceNull" + function;
               }
-            }
-          } catch (Throwable e) {
-            e.printStackTrace();
+          } else {
+              bundleUrl = instance.getBundleUrl();
           }
-          exception += "\n" + exceptionExt;
-          WXLogUtils.e("reportJSException:" + exception);
 
-        } else if (function == null) {
-          bundleUrl = "jsExceptionInstanceAndFunctionNull";
-        } else {
-          bundleUrl = "jsExceptionInstanceNull" + function;
-        }
-      } else {
-        bundleUrl = instance.getBundleUrl();
+          WXJSExceptionInfo jsException = new WXJSExceptionInfo(exceptionId, bundleUrl, WXErrorCode.WX_ERR_JS_EXECUTE.getErrorCode(), function, exception, null);
+          adapter.onJSException(jsException);
+          if (WXEnvironment.isApkDebugable()) {
+              WXLogUtils.d(jsException.toString());
+          }
       }
+  }
 
-      WXJSExceptionInfo jsException = new WXJSExceptionInfo(exceptionId, bundleUrl, WXErrorCode.WX_ERR_JS_EXECUTE.getErrorCode(), function, exception, null);
-      adapter.onJSException(jsException);
-      if (WXEnvironment.isApkDebugable()) {
-        WXLogUtils.d(jsException.toString());
-      }
-    }
+  public static class TimerInfo {
+
+    public String callbackId;
+    public long time;
+    public String instanceId;
   }
 
   private void registerDomModule() throws WXException {
     /** Tell Javascript Framework what methods you have. This is Required.**/
-    Map<String, Object> domMap = new HashMap<>();
-    domMap.put(WXDomModule.WXDOM, WXDomModule.METHODS);
+    Map<String,Object> domMap=new HashMap<>();
+    domMap.put(WXDomModule.WXDOM,WXDomModule.METHODS);
     registerModules(domMap);
   }
 
@@ -1975,7 +1963,7 @@ public class WXBridgeManager implements Callback, BactchExecutor {
       public void run() {
         if (!isJSFrameworkInit())
           return;
-
+        
         invokeExecJS("", null, METHOD_NOTIFY_SERIALIZE_CODE_CACHE, new WXJSObject[0]);
       }
     });
@@ -1989,11 +1977,4 @@ public class WXBridgeManager implements Callback, BactchExecutor {
     msg.sendToTarget();
   }
 
-  public static class TimerInfo {
-
-    public String callbackId;
-    public long time;
-    public String instanceId;
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index 842229e..94ac1e0 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -183,9 +183,6 @@ public class Constants {
     String ARIA_LABEL = "ariaLabel";
     String ARIA_HIDDEN = "ariaHidden";
 
-    String STICKY_OFFSET = "stickyOffset";
-    String HAS_FIXED_SIZE = "hasFixedSize";
-    String KEEP_POSITION_LAYOUT_DELAY = "keepPositionLayoutDelay";
 
     interface  Recycler{
       String LIST_DATA = "listData";

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java b/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
index 92b1585..9d4885c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/IWXBridge.java
@@ -38,15 +38,6 @@ public interface IWXBridge extends IWXObject {
    */
   int initFramework(String framework, WXParams params);
 
-
-  /**
-   * init Weex
-   *
-   * @param framework assets/main.js
-   * @return
-   */
-  int initFrameworkEnv(String framework, WXParams params, String cacheDir, boolean pieSupport);
-
   /**
    * execute javascript function
    */



[10/18] incubator-weex git commit: Revert: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
index b7a522a..a7d042e 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
@@ -69,8 +69,8 @@
     CGPoint _lastContentOffset;
     CGPoint _lastScrollEventFiredOffset;
     BOOL _scrollable;
-    NSString * _alwaysScrollableVertical;
-    NSString * _alwaysScrollableHorizontal;
+    BOOL _alwaysScrollableVertical;
+    BOOL _alwaysScrollableHorizontal;
 
     // vertical & horizontal
     WXScrollDirection _scrollDirection;
@@ -119,13 +119,10 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
         _lastScrollEventFiredOffset = CGPointMake(0, 0);
         _scrollDirection = attributes[@"scrollDirection"] ? [WXConvert WXScrollDirection:attributes[@"scrollDirection"]] : WXScrollDirectionVertical;
         _showScrollBar = attributes[@"showScrollbar"] ? [WXConvert BOOL:attributes[@"showScrollbar"]] : YES;
-        
-        if (attributes[@"alwaysScrollableVertical"]) {
-            _alwaysScrollableVertical = [WXConvert NSString:attributes[@"alwaysScrollableVertical"]];
-        }
-        if (attributes[@"alwaysScrollableHorizontal"]) {
-            _alwaysScrollableHorizontal = [WXConvert NSString:attributes[@"alwaysScrollableHorizontal"]];
-        }
+        // default value is NO;
+        _alwaysScrollableVertical = attributes[@"alwaysScrollableVertical"]?[WXConvert BOOL:attributes[@"alwaysScrollableVertical"]] : NO;
+        // default value is NO;
+        _alwaysScrollableHorizontal = attributes[@"alwaysScrollableHorizontal"]?[WXConvert BOOL:attributes[@"alwaysScrollableHorizontal"]] : NO;
         _pagingEnabled = attributes[@"pagingEnabled"] ? [WXConvert BOOL:attributes[@"pagingEnabled"]] : NO;
         _loadMoreOffset = attributes[@"loadmoreoffset"] ? [WXConvert WXPixelType:attributes[@"loadmoreoffset"] scaleFactor:self.weexInstance.pixelScaleFactor] : 0;
         _loadmoreretry = attributes[@"loadmoreretry"] ? [WXConvert NSUInteger:attributes[@"loadmoreretry"]] : 0;
@@ -165,12 +162,8 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
     scrollView.showsHorizontalScrollIndicator = _showScrollBar;
     scrollView.scrollEnabled = _scrollable;
     scrollView.pagingEnabled = _pagingEnabled;
-    if (_alwaysScrollableHorizontal) {
-        scrollView.alwaysBounceHorizontal = [WXConvert BOOL:_alwaysScrollableHorizontal];
-    }
-    if (_alwaysScrollableVertical) {
-        scrollView.alwaysBounceVertical = [WXConvert BOOL:_alwaysScrollableVertical];
-    }
+    scrollView.alwaysBounceHorizontal = _alwaysScrollableHorizontal;
+    scrollView.alwaysBounceVertical = _alwaysScrollableVertical;
     if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"11.0")) {
         // now use the runtime to forbid the contentInset being Adjusted.
         // here we add a category for scoller component view class compatible for new API,
@@ -239,13 +232,13 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
         ((UIScrollView *)self.view).scrollEnabled = _scrollable;
     }
     if (attributes[@"alwaysScrollableHorizontal"]) {
-        _alwaysScrollableHorizontal = [WXConvert NSString:attributes[@"alwaysScrollableHorizontal"]];
-        ((UIScrollView*)self.view).alwaysBounceHorizontal = [WXConvert BOOL:_alwaysScrollableHorizontal];
+        _alwaysScrollableHorizontal = [WXConvert BOOL:attributes[@"alwaysScrollableHorizontal"]];
+        ((UIScrollView*)self.view).alwaysBounceHorizontal = _alwaysScrollableHorizontal;
     }
     
     if (attributes[@"alwaysScrollableVertical"]) {
-        _alwaysScrollableVertical = [WXConvert NSString:attributes[@"alwaysScrollableVertical"]];
-        ((UIScrollView*)self.view).alwaysBounceVertical = [WXConvert BOOL:_alwaysScrollableVertical];
+        _alwaysScrollableVertical = [WXConvert BOOL:attributes[@"alwaysScrollableVertical"]];
+        ((UIScrollView*)self.view).alwaysBounceVertical = _alwaysScrollableVertical;
     }
     if (attributes[@"offsetAccuracy"]) {
         _offsetAccuracy = [WXConvert WXPixelType:attributes[@"offsetAccuracy"] scaleFactor:self.weexInstance.pixelScaleFactor];

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
index 792d4c9..f66bd11 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
@@ -200,9 +200,6 @@ WX_EXPORT_METHOD(@selector(goForward))
         NSMutableDictionary *data = [self baseInfo];
         [data setObject:[error localizedDescription] forKey:@"errorMsg"];
         [data setObject:[NSString stringWithFormat:@"%ld", (long)error.code] forKey:@"errorCode"];
-        if(error.userInfo && ![error.userInfo[NSURLErrorFailingURLStringErrorKey] hasPrefix:@"http"]){
-            return;
-        }
         [self fireEvent:@"error" params:data];
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m b/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m
index fb0c0b3..a72e556 100644
--- a/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m
+++ b/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m
@@ -22,8 +22,6 @@
 #import "WXConvert.h"
 #import "WXUtility.h"
 #import "WXComponent_internal.h"
-#import "UIBezierPath+Weex.h"
-#import "WXRoundedRect.h"
 
 @implementation WXComponent (BoxShadow)
 
@@ -83,20 +81,15 @@
     if (!boxShadow) {
         return;
     }
-    WXRoundedRect *borderRect = [[WXRoundedRect alloc] initWithRect:self.view.bounds topLeft:_borderTopLeftRadius topRight:_borderTopRightRadius bottomLeft:_borderBottomLeftRadius bottomRight:_borderBottomRightRadius];
-    // here is computed radii, do not use original style
-    WXRadii *radii = borderRect.radii;
-    CGFloat topLeft = radii.topLeft, topRight = radii.topRight, bottomLeft = radii.bottomLeft, bottomRight = radii.bottomRight;
-    UIBezierPath *shadowPath = [UIBezierPath wx_bezierPathWithRoundedRect:self.view.bounds topLeft:topLeft topRight:topRight bottomLeft:bottomLeft bottomRight:bottomRight];
     if (boxShadow.isInset) {
         if (boxShadow.innerLayer) {
             boxShadow.innerLayer.frame = self.view.bounds;
             if (![boxShadow.innerLayer superlayer] ){
-                self.view.layer.masksToBounds = YES;
                 [self.view.layer addSublayer:boxShadow.innerLayer];
             }
         }
     } else {
+        UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:self.view.bounds];
         self.view.layer.masksToBounds = NO;
         self.view.layer.shadowColor = boxShadow.shadowColor.CGColor;
         self.view.layer.shadowOffset = boxShadow.shadowOffset;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
index fbd62b9..e86221d 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
@@ -37,7 +37,6 @@
 #import "WXLog.h"
 #import "WXUtility.h"
 #import "WXExtendCallNativeManager.h"
-#import "WXExceptionUtils.h"
 
 @implementation WXSDKEngine
 
@@ -231,9 +230,7 @@
     WX_MONITOR_PERF_START(WXPTInitalizeSync)
     
     if (!script || script.length <= 0) {
-        NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_SDK_INIT_JSFM_INIT_FAILED] script don't exist:%@",script];
-        [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_SDK_INIT" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_SDK_INIT] function:@"initSDKEnvironment" exception:errMsg extParams:nil];
-        WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_LOAD, errMsg);
+        WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_LOAD, @"framework loading is failure!");
         return;
     }
     static dispatch_once_t onceToken;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
index e47cb1c..38b1e2b 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
@@ -51,11 +51,5 @@ typedef NS_ENUM(int, WXSDKErrCode)
     WX_ERR_NOT_CONNECTED_TO_INTERNET = -2205,
     WX_ERR_CANCEL = -2204,
     WX_ERR_DOWNLOAD_END = -2299,
-    
-    WX_KEY_EXCEPTION_SDK_INIT = -9000,
-    WX_KEY_EXCEPTION_INVOKE = -9100,
-    WX_KEY_EXCEPTION_JS_DOWNLOAD =-9200,
-    WX_KEY_EXCEPTION_DOM = -9300,
-    WX_KEY_EXCEPTION_WXBRIDGE=-9400,
 };
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.h b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.h
deleted file mode 100644
index c0bcf4b..0000000
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import "WXJSExceptionInfo.h"
-
-@interface WXExceptionUtils : NSObject
-
-+ (void)commitCriticalExceptionRT:(NSString *)instanceId errCode:(NSString *)errCode function:(NSString *)function exception:(NSString *)exception extParams:(NSDictionary *)extParams;
-
-+ (void)commitCriticalExceptionRT:(WXJSExceptionInfo*)jsExceptionInfo;
-@end
-

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m
deleted file mode 100644
index 0ed7297..0000000
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#import "WXExceptionUtils.h"
-#import "WXJSExceptionProtocol.h"
-#import "WXHandlerFactory.h"
-#import "WXSDKEngine.h"
-#import "WXSDKError.h"
-#import "WXJSExceptionInfo.h"
-#import "WXUtility.h"
-#import "WXSDKManager.h"
-
-
-@implementation WXExceptionUtils
-
-+ (void)commitCriticalExceptionRT:(NSString *)instanceId errCode:(NSString *)errCode function:(NSString *)function exception:(NSString *)exception extParams:(NSDictionary *)extParams{
-    NSString *bundleUrlCommit = @"BundleUrlDefault";
-    NSString *instanceIdCommit = @"InstanceIdDefalut";
-    
-    if(![WXUtility isBlankString:instanceId]){
-        instanceIdCommit = instanceId;
-        WXSDKInstance * instance = [WXSDKManager instanceForID:instanceId];
-        if(instance){
-            bundleUrlCommit = [instance.scriptURL absoluteString]?:bundleUrlCommit;
-        }else if([instanceIdCommit hasPrefix:@"WX_KEY_EXCEPTION"]){
-            bundleUrlCommit = instanceId;
-        }
-    }
-    
-    WXJSExceptionInfo * jsExceptionInfo = [[WXJSExceptionInfo alloc] initWithInstanceId:instanceIdCommit bundleUrl:bundleUrlCommit errorCode:errCode functionName:function exception:exception userInfo: [extParams mutableCopy]];
-    [WXExceptionUtils commitCriticalExceptionRT:jsExceptionInfo];
-}
-
-+ (void)commitCriticalExceptionRT:(WXJSExceptionInfo *)jsExceptionInfo{
-    id<WXJSExceptionProtocol> jsExceptionHandler = [WXHandlerFactory handlerForProtocol:@protocol(WXJSExceptionProtocol)];
-    if ([jsExceptionHandler respondsToSelector:@selector(onJSException:)]) {
-        [jsExceptionHandler onJSException:jsExceptionInfo];
-    }
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bdcc5356/ios/sdk/WeexSDK/Sources/WeexSDK.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/WeexSDK.h b/ios/sdk/WeexSDK/Sources/WeexSDK.h
index 562cfa8..3bbc3ea 100644
--- a/ios/sdk/WeexSDK/Sources/WeexSDK.h
+++ b/ios/sdk/WeexSDK/Sources/WeexSDK.h
@@ -53,7 +53,6 @@
 #import "WXIndicatorComponent.h"
 #import "WXImgLoaderProtocol.h"
 #import "WXExtendCallNativeProtocol.h"
-#import "WXExceptionUtils.h"
 #import "WXEventModuleProtocol.h"
 #import "WXErrorView.h"
 #import "WXDefine.h"


[02/18] incubator-weex git commit: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/test/screenshot/border-ios.png
----------------------------------------------------------------------
diff --git a/test/screenshot/border-ios.png b/test/screenshot/border-ios.png
old mode 100755
new mode 100644
index 2bacdd3..992ea7d
Binary files a/test/screenshot/border-ios.png and b/test/screenshot/border-ios.png differ


[04/18] incubator-weex git commit: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
index a7d042e..b7a522a 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXScrollerComponent.m
@@ -69,8 +69,8 @@
     CGPoint _lastContentOffset;
     CGPoint _lastScrollEventFiredOffset;
     BOOL _scrollable;
-    BOOL _alwaysScrollableVertical;
-    BOOL _alwaysScrollableHorizontal;
+    NSString * _alwaysScrollableVertical;
+    NSString * _alwaysScrollableHorizontal;
 
     // vertical & horizontal
     WXScrollDirection _scrollDirection;
@@ -119,10 +119,13 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
         _lastScrollEventFiredOffset = CGPointMake(0, 0);
         _scrollDirection = attributes[@"scrollDirection"] ? [WXConvert WXScrollDirection:attributes[@"scrollDirection"]] : WXScrollDirectionVertical;
         _showScrollBar = attributes[@"showScrollbar"] ? [WXConvert BOOL:attributes[@"showScrollbar"]] : YES;
-        // default value is NO;
-        _alwaysScrollableVertical = attributes[@"alwaysScrollableVertical"]?[WXConvert BOOL:attributes[@"alwaysScrollableVertical"]] : NO;
-        // default value is NO;
-        _alwaysScrollableHorizontal = attributes[@"alwaysScrollableHorizontal"]?[WXConvert BOOL:attributes[@"alwaysScrollableHorizontal"]] : NO;
+        
+        if (attributes[@"alwaysScrollableVertical"]) {
+            _alwaysScrollableVertical = [WXConvert NSString:attributes[@"alwaysScrollableVertical"]];
+        }
+        if (attributes[@"alwaysScrollableHorizontal"]) {
+            _alwaysScrollableHorizontal = [WXConvert NSString:attributes[@"alwaysScrollableHorizontal"]];
+        }
         _pagingEnabled = attributes[@"pagingEnabled"] ? [WXConvert BOOL:attributes[@"pagingEnabled"]] : NO;
         _loadMoreOffset = attributes[@"loadmoreoffset"] ? [WXConvert WXPixelType:attributes[@"loadmoreoffset"] scaleFactor:self.weexInstance.pixelScaleFactor] : 0;
         _loadmoreretry = attributes[@"loadmoreretry"] ? [WXConvert NSUInteger:attributes[@"loadmoreretry"]] : 0;
@@ -162,8 +165,12 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
     scrollView.showsHorizontalScrollIndicator = _showScrollBar;
     scrollView.scrollEnabled = _scrollable;
     scrollView.pagingEnabled = _pagingEnabled;
-    scrollView.alwaysBounceHorizontal = _alwaysScrollableHorizontal;
-    scrollView.alwaysBounceVertical = _alwaysScrollableVertical;
+    if (_alwaysScrollableHorizontal) {
+        scrollView.alwaysBounceHorizontal = [WXConvert BOOL:_alwaysScrollableHorizontal];
+    }
+    if (_alwaysScrollableVertical) {
+        scrollView.alwaysBounceVertical = [WXConvert BOOL:_alwaysScrollableVertical];
+    }
     if (WX_SYS_VERSION_GREATER_THAN_OR_EQUAL_TO(@"11.0")) {
         // now use the runtime to forbid the contentInset being Adjusted.
         // here we add a category for scoller component view class compatible for new API,
@@ -232,13 +239,13 @@ WX_EXPORT_METHOD(@selector(resetLoadmore))
         ((UIScrollView *)self.view).scrollEnabled = _scrollable;
     }
     if (attributes[@"alwaysScrollableHorizontal"]) {
-        _alwaysScrollableHorizontal = [WXConvert BOOL:attributes[@"alwaysScrollableHorizontal"]];
-        ((UIScrollView*)self.view).alwaysBounceHorizontal = _alwaysScrollableHorizontal;
+        _alwaysScrollableHorizontal = [WXConvert NSString:attributes[@"alwaysScrollableHorizontal"]];
+        ((UIScrollView*)self.view).alwaysBounceHorizontal = [WXConvert BOOL:_alwaysScrollableHorizontal];
     }
     
     if (attributes[@"alwaysScrollableVertical"]) {
-        _alwaysScrollableVertical = [WXConvert BOOL:attributes[@"alwaysScrollableVertical"]];
-        ((UIScrollView*)self.view).alwaysBounceVertical = _alwaysScrollableVertical;
+        _alwaysScrollableVertical = [WXConvert NSString:attributes[@"alwaysScrollableVertical"]];
+        ((UIScrollView*)self.view).alwaysBounceVertical = [WXConvert BOOL:_alwaysScrollableVertical];
     }
     if (attributes[@"offsetAccuracy"]) {
         _offsetAccuracy = [WXConvert WXPixelType:attributes[@"offsetAccuracy"] scaleFactor:self.weexInstance.pixelScaleFactor];

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
index f66bd11..792d4c9 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m
@@ -200,6 +200,9 @@ WX_EXPORT_METHOD(@selector(goForward))
         NSMutableDictionary *data = [self baseInfo];
         [data setObject:[error localizedDescription] forKey:@"errorMsg"];
         [data setObject:[NSString stringWithFormat:@"%ld", (long)error.code] forKey:@"errorCode"];
+        if(error.userInfo && ![error.userInfo[NSURLErrorFailingURLStringErrorKey] hasPrefix:@"http"]){
+            return;
+        }
         [self fireEvent:@"error" params:data];
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m b/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m
index a72e556..fb0c0b3 100644
--- a/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m
+++ b/ios/sdk/WeexSDK/Sources/Display/WXComponent+BoxShadow.m
@@ -22,6 +22,8 @@
 #import "WXConvert.h"
 #import "WXUtility.h"
 #import "WXComponent_internal.h"
+#import "UIBezierPath+Weex.h"
+#import "WXRoundedRect.h"
 
 @implementation WXComponent (BoxShadow)
 
@@ -81,15 +83,20 @@
     if (!boxShadow) {
         return;
     }
+    WXRoundedRect *borderRect = [[WXRoundedRect alloc] initWithRect:self.view.bounds topLeft:_borderTopLeftRadius topRight:_borderTopRightRadius bottomLeft:_borderBottomLeftRadius bottomRight:_borderBottomRightRadius];
+    // here is computed radii, do not use original style
+    WXRadii *radii = borderRect.radii;
+    CGFloat topLeft = radii.topLeft, topRight = radii.topRight, bottomLeft = radii.bottomLeft, bottomRight = radii.bottomRight;
+    UIBezierPath *shadowPath = [UIBezierPath wx_bezierPathWithRoundedRect:self.view.bounds topLeft:topLeft topRight:topRight bottomLeft:bottomLeft bottomRight:bottomRight];
     if (boxShadow.isInset) {
         if (boxShadow.innerLayer) {
             boxShadow.innerLayer.frame = self.view.bounds;
             if (![boxShadow.innerLayer superlayer] ){
+                self.view.layer.masksToBounds = YES;
                 [self.view.layer addSublayer:boxShadow.innerLayer];
             }
         }
     } else {
-        UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:self.view.bounds];
         self.view.layer.masksToBounds = NO;
         self.view.layer.shadowColor = boxShadow.shadowColor.CGColor;
         self.view.layer.shadowOffset = boxShadow.shadowOffset;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
index e86221d..fbd62b9 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.m
@@ -37,6 +37,7 @@
 #import "WXLog.h"
 #import "WXUtility.h"
 #import "WXExtendCallNativeManager.h"
+#import "WXExceptionUtils.h"
 
 @implementation WXSDKEngine
 
@@ -230,7 +231,9 @@
     WX_MONITOR_PERF_START(WXPTInitalizeSync)
     
     if (!script || script.length <= 0) {
-        WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_LOAD, @"framework loading is failure!");
+        NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_SDK_INIT_JSFM_INIT_FAILED] script don't exist:%@",script];
+        [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_SDK_INIT" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_SDK_INIT] function:@"initSDKEnvironment" exception:errMsg extParams:nil];
+        WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_LOAD, errMsg);
         return;
     }
     static dispatch_once_t onceToken;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
index 38b1e2b..e47cb1c 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
@@ -51,5 +51,11 @@ typedef NS_ENUM(int, WXSDKErrCode)
     WX_ERR_NOT_CONNECTED_TO_INTERNET = -2205,
     WX_ERR_CANCEL = -2204,
     WX_ERR_DOWNLOAD_END = -2299,
+    
+    WX_KEY_EXCEPTION_SDK_INIT = -9000,
+    WX_KEY_EXCEPTION_INVOKE = -9100,
+    WX_KEY_EXCEPTION_JS_DOWNLOAD =-9200,
+    WX_KEY_EXCEPTION_DOM = -9300,
+    WX_KEY_EXCEPTION_WXBRIDGE=-9400,
 };
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.h b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.h
new file mode 100644
index 0000000..c0bcf4b
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.h
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "WXJSExceptionInfo.h"
+
+@interface WXExceptionUtils : NSObject
+
++ (void)commitCriticalExceptionRT:(NSString *)instanceId errCode:(NSString *)errCode function:(NSString *)function exception:(NSString *)exception extParams:(NSDictionary *)extParams;
+
++ (void)commitCriticalExceptionRT:(WXJSExceptionInfo*)jsExceptionInfo;
+@end
+

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m
new file mode 100644
index 0000000..0ed7297
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import "WXExceptionUtils.h"
+#import "WXJSExceptionProtocol.h"
+#import "WXHandlerFactory.h"
+#import "WXSDKEngine.h"
+#import "WXSDKError.h"
+#import "WXJSExceptionInfo.h"
+#import "WXUtility.h"
+#import "WXSDKManager.h"
+
+
+@implementation WXExceptionUtils
+
++ (void)commitCriticalExceptionRT:(NSString *)instanceId errCode:(NSString *)errCode function:(NSString *)function exception:(NSString *)exception extParams:(NSDictionary *)extParams{
+    NSString *bundleUrlCommit = @"BundleUrlDefault";
+    NSString *instanceIdCommit = @"InstanceIdDefalut";
+    
+    if(![WXUtility isBlankString:instanceId]){
+        instanceIdCommit = instanceId;
+        WXSDKInstance * instance = [WXSDKManager instanceForID:instanceId];
+        if(instance){
+            bundleUrlCommit = [instance.scriptURL absoluteString]?:bundleUrlCommit;
+        }else if([instanceIdCommit hasPrefix:@"WX_KEY_EXCEPTION"]){
+            bundleUrlCommit = instanceId;
+        }
+    }
+    
+    WXJSExceptionInfo * jsExceptionInfo = [[WXJSExceptionInfo alloc] initWithInstanceId:instanceIdCommit bundleUrl:bundleUrlCommit errorCode:errCode functionName:function exception:exception userInfo: [extParams mutableCopy]];
+    [WXExceptionUtils commitCriticalExceptionRT:jsExceptionInfo];
+}
+
++ (void)commitCriticalExceptionRT:(WXJSExceptionInfo *)jsExceptionInfo{
+    id<WXJSExceptionProtocol> jsExceptionHandler = [WXHandlerFactory handlerForProtocol:@protocol(WXJSExceptionProtocol)];
+    if ([jsExceptionHandler respondsToSelector:@selector(onJSException:)]) {
+        [jsExceptionHandler onJSException:jsExceptionInfo];
+    }
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/WeexSDK.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/WeexSDK.h b/ios/sdk/WeexSDK/Sources/WeexSDK.h
index 3bbc3ea..562cfa8 100644
--- a/ios/sdk/WeexSDK/Sources/WeexSDK.h
+++ b/ios/sdk/WeexSDK/Sources/WeexSDK.h
@@ -53,6 +53,7 @@
 #import "WXIndicatorComponent.h"
 #import "WXImgLoaderProtocol.h"
 #import "WXExtendCallNativeProtocol.h"
+#import "WXExceptionUtils.h"
 #import "WXEventModuleProtocol.h"
 #import "WXErrorView.h"
 #import "WXDefine.h"


[05/18] incubator-weex git commit: * [android] modify border-android.png

Posted by gu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
index 782b16c..03f3057 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
@@ -335,9 +335,7 @@ public class WXDomObject extends CSSNode implements Cloneable,ImmutableDomObject
 
     int index = mDomChildren.indexOf(child);
     if (index == -1) {
-      if (WXEnvironment.isApkDebugable()) {
         WXLogUtils.e("[WXDomObject] remove function error");
-      }
       return;
     }
     mDomChildren.remove(index).parent = null;
@@ -685,7 +683,7 @@ public class WXDomObject extends CSSNode implements Cloneable,ImmutableDomObject
             type = TextUtils.isEmpty(result.replacedComponent) ? WXBasicComponentType.DIV
                     : result.replacedComponent;
             json.put(TYPE, type);
-            if (WXEnvironment.isApkDebugable() && result.validateInfo != null) {
+            if (result.validateInfo != null) {
               String tag = "[WXDomObject]onComponentValidate failure. >>> " + result.validateInfo.toJSONString();
               WXLogUtils.e(tag);
             }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java b/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java
index 9f35263..3fcedcb 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/AbstractAddElementAction.java
@@ -96,9 +96,7 @@ public abstract class AbstractAddElementAction extends TraceableAction implement
     Stopwatch.split("parseDomObject");
 
     if (domObject == null || context.getDomByRef(domObject.getRef()) != null) {
-      if (WXEnvironment.isApkDebugable()) {
-        WXLogUtils.e("[DOMActionContextImpl] " + getStatementName() + " error,DOM object is null or already registered!!");
-      }
+      WXLogUtils.e("[DOMActionContextImpl] " + getStatementName() + " error,DOM object is null or already registered!!");
       instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, errCode);
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java b/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java
index 258da68..bbd093c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/action/MoveElementAction.java
@@ -91,5 +91,8 @@ final class MoveElementAction implements DOMAction, RenderAction {
     WXVContainer oldParent = component.getParent();
     oldParent.remove(component,false);
     ((WXVContainer) newParent).addChild(component, mNewIndex);
+    if(!component.isVirtualComponent()){
+      ((WXVContainer) newParent).addSubView(component.getHostView(), mNewIndex);
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
index a8d1963..4ca9d50 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/AbstractEditComponent.java
@@ -221,6 +221,14 @@ public abstract class AbstractEditComponent extends WXComponent<WXEditText> {
 
           mBeforeText = s.toString();
 
+          if (getDomObject() != null && getDomObject().getAttrs() != null) {
+            Object val = getDomObject().getAttrs().get(Constants.Name.VALUE);
+            String valString = WXUtils.getString(val, null);
+            if (mBeforeText != null && mBeforeText.equals(valString)) {
+              return;
+            }
+          }
+
           if (!mIgnoreNextOnInputEvent) {
             fireEvent(Constants.Event.INPUT, s.toString());
           }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index bd6c2d7..082c14e 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -999,7 +999,9 @@ public abstract class  WXComponent<T extends View> implements IWXObject, IWXActi
    * @param type
    */
   public void addEvent(String type) {
-    if (TextUtils.isEmpty(type) || mAppendEvents.contains(type)) {
+    if (TextUtils.isEmpty(type)
+            || mAppendEvents.contains(type)
+            || getRealView() == null) {
       return;
     }
     mAppendEvents.add(type);

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java
index 4323821..4f9712f 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponentFactory.java
@@ -59,11 +59,9 @@ public class WXComponentFactory {
 
     IFComponentHolder holder = WXComponentRegistry.getComponent(node.getType());
     if (holder == null) {
-      if (WXEnvironment.isApkDebugable()) {
         String tag = "WXComponentFactory error type:[" +
                 node.getType() + "]" + " class not found";
         WXLogUtils.e(tag);
-      }
       //For compatible reason of JS framework, unregistered type will be treated as container.
       holder = WXComponentRegistry.getComponent(WXBasicComponentType.CONTAINER);
       if(holder == null){

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
index 1cf5d02..1c4d062 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXImage.java
@@ -19,6 +19,7 @@
 package com.taobao.weex.ui.component;
 
 import android.Manifest;
+import android.app.Activity;
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.graphics.RectF;
@@ -27,6 +28,7 @@ import android.net.Uri;
 import android.os.Build;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
+import android.support.v4.app.ActivityCompat;
 import android.support.v4.content.ContextCompat;
 import android.text.TextUtils;
 import android.widget.ImageView;
@@ -71,6 +73,7 @@ public class WXImage extends WXComponent<ImageView> {
 
   public static final String SUCCEED = "success";
   public static final String ERRORDESC = "errorDesc";
+  private static final int WRITE_EXTERNAL_STORAGE_PERMISSION_REQUEST_CODE = 0x2;
 
   private String mSrc;
   private int mBlurRadius;
@@ -356,6 +359,13 @@ public class WXImage extends WXComponent<ImageView> {
   public void save(final JSCallback saveStatuCallback) {
 
     if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
+      if (getContext() instanceof Activity) {
+        ActivityCompat.requestPermissions((Activity) getContext(),
+                new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, WRITE_EXTERNAL_STORAGE_PERMISSION_REQUEST_CODE);
+      }
+    }
+
+    if (ContextCompat.checkSelfPermission(getContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
       if (saveStatuCallback != null) {
         Map<String, Object> result = new HashMap<>();
         result.put(SUCCEED, false);

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
index 6cf784f..9e56259 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXScroller.java
@@ -233,7 +233,7 @@ public class WXScroller extends WXVContainer<ViewGroup> implements WXScrollViewL
    * Intercept refresh view and loading view
    */
   @Override
-  protected void addSubView(View child, int index) {
+  public void addSubView(View child, int index) {
     if (child == null || getRealView() == null) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
index 1023e3e..ec2d73f 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSlider.java
@@ -173,7 +173,7 @@ public class WXSlider extends WXVContainer<FrameLayout> {
   }
 
   @Override
-  protected void addSubView(View view, int index) {
+  public void addSubView(View view, int index) {
     if (view == null || mAdapter == null) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java
index b1001b7..0899c8d 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXSliderNeighbor.java
@@ -113,7 +113,7 @@ public class WXSliderNeighbor extends WXSlider {
     }
 
     @Override
-    protected void addSubView(View view, final int index) {
+    public void addSubView(View view, final int index) {
         if (view == null || mAdapter == null) {
             return;
         }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
index e9263eb..62b667b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java
@@ -20,6 +20,9 @@ package com.taobao.weex.ui.component;
 
 import android.content.Context;
 import android.content.Intent;
+import android.support.annotation.RestrictTo;
+import android.support.annotation.RestrictTo.Scope;
+import android.util.Pair;
 import android.support.annotation.Nullable;
 import android.util.Pair;
 import android.view.Menu;
@@ -309,7 +312,8 @@ public abstract class WXVContainer<T extends ViewGroup> extends WXComponent<T> {
     }
   }
 
-  protected void addSubView(View child, int index) {
+  @RestrictTo(Scope.LIBRARY)
+  public void addSubView(View child, int index) {
     if (child == null || getRealView() == null) {
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
index 640a17e..c04ed0a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
@@ -150,6 +150,15 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
   private WXStickyHelper stickyHelper;
 
 
+
+  /**
+   * keep positon
+   * */
+  private  WXComponent keepPositionCell = null;
+  private  Runnable keepPositionCellRunnable = null;
+  private  long keepPositionLayoutDelay = 150;
+
+
   public BasicListComponent(WXSDKInstance instance, WXDomObject node, WXVContainer parent) {
     super(instance, node, parent);
     stickyHelper = new WXStickyHelper(this);
@@ -236,6 +245,9 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
     if (transforms != null) {
       bounceRecyclerView.getInnerView().addItemDecoration(RecyclerTransform.parseTransforms(getOrientation(), transforms));
     }
+    if(getDomObject().getAttrs().get(Constants.Name.KEEP_POSITION_LAYOUT_DELAY) != null){
+      keepPositionLayoutDelay = WXUtils.getNumberInt(getDomObject().getAttrs().get(Constants.Name.KEEP_POSITION_LAYOUT_DELAY), (int)keepPositionLayoutDelay);
+    }
 
     mItemAnimator=bounceRecyclerView.getInnerView().getItemAnimator();
 
@@ -245,6 +257,10 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
     bounceRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
     bounceRecyclerView.getInnerView().clearOnScrollListeners();
     bounceRecyclerView.getInnerView().addOnScrollListener(mViewOnScrollListener);
+    if(getDomObject().getAttrs().get(Constants.Name.HAS_FIXED_SIZE) != null){
+      boolean hasFixedSize = WXUtils.getBoolean(getDomObject().getAttrs().get(Constants.Name.HAS_FIXED_SIZE), false);
+      bounceRecyclerView.getInnerView().setHasFixedSize(hasFixedSize);
+    }
     bounceRecyclerView.getInnerView().addOnScrollListener(new RecyclerView.OnScrollListener() {
       @Override
       public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
@@ -485,53 +501,54 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
       if (stickyComponent != null && stickyComponent.getDomObject() != null
           && stickyComponent instanceof WXCell) {
 
-        WXCell cell = (WXCell) stickyComponent;
-        if (cell.getHostView() == null) {
-          return;
-        }
+          WXCell cell = (WXCell) stickyComponent;
+          if (cell.getHostView() == null) {
+            return;
+          }
+
+          int[] location = new int[2];
+          stickyComponent.getHostView().getLocationOnScreen(location);
+          int[] parentLocation = new int[2];
+          stickyComponent.getParentScroller().getView().getLocationOnScreen(parentLocation);
+          int top = location[1] - parentLocation[1];
+
 
           RecyclerView.LayoutManager layoutManager;
           boolean beforeFirstVisibleItem = false;
           boolean removeOldSticky = false;
           layoutManager = getHostView().getInnerView().getLayoutManager();
           if (layoutManager instanceof LinearLayoutManager || layoutManager instanceof GridLayoutManager) {
-            int fVisible = ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition();
+            int firstVisiblePosition = ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition();
+            int lastVisiblePosition = ((LinearLayoutManager) layoutManager).findLastVisibleItemPosition();
             int pos = mChildren.indexOf(cell);
             cell.setScrollPositon(pos);
-
-            if (pos <= fVisible) {
+            if (pos <= firstVisiblePosition
+                    || (cell.getStickyOffset() > 0 && firstVisiblePosition < pos && pos <= lastVisiblePosition  &&
+                    top <= cell.getStickyOffset())) {
               beforeFirstVisibleItem = true;
               if(pos > currentStickyPos) {
                 currentStickyPos = pos;
               }
-            }
-
-            if(pos > fVisible){
+            }else{
               removeOldSticky = true;
             }
           } else if(layoutManager instanceof StaggeredGridLayoutManager){
             int [] firstItems= new int[3];
-            int fVisible = ((StaggeredGridLayoutManager) layoutManager).findFirstVisibleItemPositions(firstItems)[0];
+            int firstVisiblePosition = ((StaggeredGridLayoutManager) layoutManager).findFirstVisibleItemPositions(firstItems)[0];
+            int lastVisiblePosition = ((StaggeredGridLayoutManager)  layoutManager).findLastVisibleItemPositions(firstItems)[0];
             int pos = mChildren.indexOf(cell);
 
-            if (pos <= fVisible) {
+            if (pos <= firstVisiblePosition || (cell.getStickyOffset() > 0 && firstVisiblePosition < pos && pos <= lastVisiblePosition  &&
+                    top <= cell.getStickyOffset())) {
               beforeFirstVisibleItem = true;
-            }
-
-            if(pos > fVisible){
+            }else{
               removeOldSticky = true;
             }
           }
 
-          int[] location = new int[2];
-          stickyComponent.getHostView().getLocationOnScreen(location);
-          int[] parentLocation = new int[2];
-          stickyComponent.getParentScroller().getView().getLocationOnScreen(parentLocation);
-
-          int top = location[1] - parentLocation[1];
 
-          boolean showSticky = beforeFirstVisibleItem && cell.getLocationFromStart() >= 0 && top <= 0 && dy >= 0;
-          boolean removeSticky = cell.getLocationFromStart() <= 0 && top > 0 && dy <= 0;
+          boolean showSticky = beforeFirstVisibleItem && cell.getLocationFromStart() >= 0 && top <= cell.getStickyOffset() && dy >= 0;
+          boolean removeSticky = cell.getLocationFromStart() <= cell.getStickyOffset() && top > cell.getStickyOffset() && dy <= 0;
           if (showSticky) {
             bounceRecyclerView.notifyStickyShow(cell);
           } else if (removeSticky || removeOldSticky) {
@@ -584,7 +601,6 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
   @Override
   public void addChild(WXComponent child, int index) {
     super.addChild(child, index);
-
     if (child == null || index < -1) {
       return;
     }
@@ -593,7 +609,7 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
     bindViewType(child);
 
     int adapterPosition = index == -1 ? mChildren.size() - 1 : index;
-    T view = getHostView();
+    final T view = getHostView();
     if (view != null) {
       boolean isAddAnimation = false;
       ImmutableDomObject domObject = child.getDomObject();
@@ -616,9 +632,52 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
         }
       }
       if (isKeepScrollPosition) {
-        int last=((LinearLayoutManager)view.getInnerView().getLayoutManager()).findLastVisibleItemPosition();
-        view.getInnerView().getLayoutManager().scrollToPosition(last);
+        if(view.getInnerView().getLayoutManager() instanceof  LinearLayoutManager){
+            if(!view.getInnerView().isLayoutFrozen()){ //frozen, prevent layout when scroll
+                view.getInnerView().setLayoutFrozen(true);
+            }
+            if(keepPositionCell == null){
+              int last=((LinearLayoutManager)view.getInnerView().getLayoutManager()).findLastCompletelyVisibleItemPosition();
+              ListBaseViewHolder holder = (ListBaseViewHolder) view.getInnerView().findViewHolderForAdapterPosition(last);
+              if(holder != null){
+                 keepPositionCell = holder.getComponent();
+              }
+              if(keepPositionCell != null) {
+                if(keepPositionCellRunnable != null){
+                  view.removeCallbacks(keepPositionCellRunnable);
+                }
+                keepPositionCellRunnable = new Runnable() {
+                  @Override
+                  public void run() {
+                    if(keepPositionCell != null){
+                      int keepPosition = indexOf(keepPositionCell);
+                      int offset = 0;
+                      if(keepPositionCell.getHostView() != null){
+                        offset = keepPositionCell.getHostView().getTop();
+                      }
+                      if(offset > 0) {
+                        ((LinearLayoutManager) view.getInnerView().getLayoutManager()).scrollToPositionWithOffset(keepPosition, offset);
+                      }else{
+                        view.getInnerView().getLayoutManager().scrollToPosition(keepPosition);
+
+                      }
+                      view.getInnerView().setLayoutFrozen(false);
+                      keepPositionCell = null;
+                      keepPositionCellRunnable = null;
+                    }
+                  }
+                };
+              }
+            }
+            if(keepPositionCellRunnable == null){
+               view.getInnerView().scrollToPosition(((LinearLayoutManager)view.getInnerView().getLayoutManager()).findLastVisibleItemPosition());
+            }
+        }
         view.getRecyclerViewBaseAdapter().notifyItemInserted(adapterPosition);
+        if(keepPositionCellRunnable != null){
+          view.removeCallbacks(keepPositionCellRunnable);
+          view.postDelayed(keepPositionCellRunnable, keepPositionLayoutDelay);
+        }
       } else {
         view.getRecyclerViewBaseAdapter().notifyItemChanged(adapterPosition);
       }
@@ -628,6 +687,7 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
 
 
 
+
   private void relocateAppearanceHelper() {
     Iterator<Map.Entry<String, AppearanceHelper>> iterator = mAppearComponents.entrySet().iterator();
     while (iterator.hasNext()) {
@@ -646,7 +706,7 @@ public abstract class BasicListComponent<T extends ViewGroup & ListComponentView
    * com.taobao.weex.ui.view.listview.WXRecyclerView}
    */
   @Override
-  protected void addSubView(View child, int index) {
+  public void addSubView(View child, int index) {
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java
index 1534013..cedd86c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/StickyHeaderHelper.java
@@ -21,6 +21,7 @@ package com.taobao.weex.ui.component.list;
 import android.view.View;
 import android.view.ViewGroup;
 
+import com.taobao.weex.WXEnvironment;
 import com.taobao.weex.common.WXThread;
 import com.taobao.weex.utils.WXLogUtils;
 
@@ -87,12 +88,20 @@ public class StickyHeaderHelper {
         if ((existedParent = (ViewGroup) headerView.getParent()) != null) {
           existedParent.removeView(headerView);
         }
+        headerView.setTag(headComponent.getRef());
         mParent.addView(headerView);
+        headerView.setTag(this);
+        if(headComponent.getStickyOffset() > 0) {
+          ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) headerView.getLayoutParams();
+          if(headComponent.getStickyOffset() != params.topMargin) {
+            params.topMargin = headComponent.getStickyOffset();
+          }
+        }
         //recover translation, sometimes it will be changed on fling
         headerView.setTranslationX(translationX);
         headerView.setTranslationY(translationY);
-
       }
+      changeFrontStickyVisible();
       if (headComponent.getDomObject().getEvents().contains("sticky")) {
         headComponent.fireEvent("sticky");
       }
@@ -108,7 +117,8 @@ public class StickyHeaderHelper {
 
 
     if(component == null || headerView == null){
-      WXLogUtils.e(" sticky header to remove not found."+compToRemove.getRef());
+      if(WXEnvironment.isApkDebugable()) {
+      }
       return;
     }
     if(mCurrentStickyRef != null && mCurrentStickyRef.equals(compToRemove.getRef())){
@@ -118,7 +128,12 @@ public class StickyHeaderHelper {
       @Override
       public void run() {
         mParent.removeView(headerView);
+        if(headerView.getVisibility() != View.VISIBLE){
+           headerView.setVisibility(View.VISIBLE);
+        }
         component.recoverySticky();
+        changeFrontStickyVisible();
+
       }
     }));
     if (component.getDomObject().getEvents().contains("unsticky")) {
@@ -141,6 +156,7 @@ public class StickyHeaderHelper {
         View view = mHeaderViews.get(cell.getRef());
         if(view != null){
           view.bringToFront();
+          changeFrontStickyVisible();
         }
       }
     }
@@ -148,4 +164,27 @@ public class StickyHeaderHelper {
       notifyStickyRemove(cell);
     }
   }
+
+
+  private void changeFrontStickyVisible(){
+    if(mHeaderViews.size() <= 0){
+      return;
+    }
+    boolean  fontVisible = false;
+    for(int i=mParent.getChildCount()-1; i>=0; i--){
+         View view = mParent.getChildAt(i);
+         if(fontVisible && view.getTag() instanceof  StickyHeaderHelper){
+             if(view.getVisibility() != View.GONE){
+                  view.setVisibility(View.GONE);
+             }
+         }else{
+           if(view.getTag() instanceof  StickyHeaderHelper){
+               fontVisible = true;
+               if(view != null && view.getVisibility() != View.VISIBLE){
+                   view.setVisibility(View.VISIBLE);
+               }
+           }
+         }
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
index 4fe4bc2..925da65 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
@@ -37,6 +37,9 @@ import com.taobao.weex.ui.flat.WidgetContainer;
 import com.taobao.weex.ui.view.WXFrameLayout;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
+import com.taobao.weex.utils.WXViewUtils;
+
+import static com.taobao.weex.common.Constants.Name.STICKY_OFFSET;
 
 /**
  * Root component for components in {@link WXListComponent}
@@ -55,12 +58,14 @@ public class WXCell extends WidgetContainer<WXFrameLayout> {
     private int mScrollPositon = -1;
     private boolean mFlatUIEnabled = false;
 
+
     private Object  renderData;
 
     private boolean isSourceUsed = false;
 
     private boolean hasLayout = false;
 
+
     @Deprecated
     public WXCell(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy) {
         super(instance, dom, parent);
@@ -142,28 +147,41 @@ public class WXCell extends WidgetContainer<WXFrameLayout> {
     }
 
     public void removeSticky() {
-        mHeadView = getHostView().getChildAt(0);
-        int[] location = new int[2];
-        int[] parentLocation = new int[2];
-        getHostView().getLocationOnScreen(location);
-        getParentScroller().getView().getLocationOnScreen(parentLocation);
-        int headerViewOffsetX = location[0] - parentLocation[0];
-        int headerViewOffsetY = getParent().getHostView().getTop();
-        getHostView().removeView(mHeadView);
-        mRealView = (ViewGroup) mHeadView;
-        mTempStickyView = new FrameLayout(getContext());
-        FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams((int) getDomObject().getLayoutWidth(),
-                (int) getDomObject().getLayoutHeight());
-        getHostView().addView(mTempStickyView, lp);
-        mHeadView.setTranslationX(headerViewOffsetX);
-        mHeadView.setTranslationY(headerViewOffsetY);
+        if(getHostView().getChildCount() > 0) {
+            mHeadView = getHostView().getChildAt(0);
+            int[] location = new int[2];
+            int[] parentLocation = new int[2];
+            getHostView().getLocationOnScreen(location);
+            getParentScroller().getView().getLocationOnScreen(parentLocation);
+            int headerViewOffsetX = location[0] - parentLocation[0];
+            int headerViewOffsetY = getParent().getHostView().getTop();
+            getHostView().removeView(mHeadView);
+            mRealView = (ViewGroup) mHeadView;
+            mTempStickyView = new FrameLayout(getContext());
+            FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams((int) getDomObject().getLayoutWidth(),
+                    (int) getDomObject().getLayoutHeight());
+            getHostView().addView(mTempStickyView, lp);
+            mHeadView.setTranslationX(headerViewOffsetX);
+            mHeadView.setTranslationY(headerViewOffsetY);
+        }
     }
 
     public void recoverySticky() {
-        getHostView().removeView(mTempStickyView);
-        getHostView().addView(mHeadView);
-        mHeadView.setTranslationX(0);
-        mHeadView.setTranslationY(0);
+        if(mHeadView != null){
+            if(mHeadView.getLayoutParams() != null){
+                ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mHeadView.getLayoutParams();
+                if(params.topMargin > 0){
+                    params.topMargin = 0;
+                }
+            }
+            if(mHeadView.getVisibility() != View.VISIBLE){
+                mHeadView.setVisibility(View.VISIBLE);
+            }
+            getHostView().removeView(mTempStickyView);
+            getHostView().addView(mHeadView);
+            mHeadView.setTranslationX(0);
+            mHeadView.setTranslationY(0);
+        }
     }
 
     @Override
@@ -185,6 +203,18 @@ public class WXCell extends WidgetContainer<WXFrameLayout> {
         return getInstance().getFlatUIContext().isFlatUIEnabled(this) && WXCell.class.equals(getClass()) && !isSticky();
     }
 
+    public int getStickyOffset(){
+        if(getDomObject() == null){
+            return  0;
+        }
+        WXDomObject domObject = (WXDomObject) getDomObject();
+        if(domObject.getAttrs().get(STICKY_OFFSET) == null){
+            return 0;
+        }
+        float  offset = WXUtils.getFloat(domObject.getAttrs().get(STICKY_OFFSET));
+        return (int)(WXViewUtils.getRealPxByWidth(offset,domObject.getViewPortWidth()));
+    }
+
     public Object getRenderData() {
         return renderData;
     }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
index 7e0746b..76bcce0 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/WXRecyclerTemplateList.java
@@ -593,7 +593,7 @@ public class WXRecyclerTemplateList extends WXVContainer<BounceRecyclerView> imp
      * com.taobao.weex.ui.view.listview.WXRecyclerView}
      */
     @Override
-    protected void addSubView(View child, int index) {
+    public void addSubView(View child, int index) {
 
     }
 
@@ -1306,7 +1306,7 @@ public class WXRecyclerTemplateList extends WXVContainer<BounceRecyclerView> imp
                     continue;
                 }
                 TemplateViewHolder itemHolder = (TemplateViewHolder) recyclerView.findViewHolderForAdapterPosition(position);
-                if(itemHolder == null){
+                if(itemHolder == null || itemHolder.getComponent() == null){
                     break;
                 }
                 List<WXComponent> childListeners = findChildListByRef(itemHolder.getComponent(), helper.getAwareChild().getRef());

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java
index 20be140..b2a1793 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/listview/WXRecyclerView.java
@@ -42,6 +42,8 @@ public class WXRecyclerView extends RecyclerView implements WXGestureObservable
   public static final int TYPE_STAGGERED_GRID_LAYOUT = 3;
   private WXGesture mGesture;
   private boolean scrollable = true;
+  private boolean hasTouch = false;
+
 
   public WXRecyclerView(Context context) {
     super(context);
@@ -91,6 +93,7 @@ public class WXRecyclerView extends RecyclerView implements WXGestureObservable
     if(!scrollable) {
       return true;
     }
+    hasTouch = true;
     boolean result = super.onTouchEvent(event);
     if (mGesture != null) {
       result |= mGesture.onTouch(this, event);
@@ -110,26 +113,31 @@ public class WXRecyclerView extends RecyclerView implements WXGestureObservable
       }
       //Any else?
     } else {
+      smoothScrollToPosition(position);
       if (offset != 0) {
         setOnSmoothScrollEndListener(new ExtendedLinearLayoutManager.OnSmoothScrollEndListener() {
           @Override
           public void onStop() {
-            if (orientation == Constants.Orientation.VERTICAL) {
-                smoothScrollBy(0, offset);
-            } else {
-                smoothScrollBy(offset, 0);
-            }
+            post(new Runnable() {
+              @Override
+              public void run() {
+                if (orientation == Constants.Orientation.VERTICAL) {
+                  smoothScrollBy(0, offset);
+                } else {
+                  smoothScrollBy(offset, 0);
+                }
+              }
+            });
           }
         });
       }
-      smoothScrollToPosition(position);
     }
   }
 
   public void setOnSmoothScrollEndListener(final ExtendedLinearLayoutManager.OnSmoothScrollEndListener onSmoothScrollEndListener){
-    if(getLayoutManager() instanceof ExtendedLinearLayoutManager){
+    if(getLayoutManager() instanceof ExtendedLinearLayoutManager && !hasTouch){
        ExtendedLinearLayoutManager extendedLinearLayoutManager = (ExtendedLinearLayoutManager)getLayoutManager();
-       extendedLinearLayoutManager.setOnScrollEndListener(onSmoothScrollEndListener);
+      extendedLinearLayoutManager.setOnScrollEndListener(onSmoothScrollEndListener);
     }else{
       addOnScrollListener(new RecyclerView.OnScrollListener() {
         @Override

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
index 1f2b4b1..1f5b4b2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
@@ -71,13 +71,18 @@ public class WXLogUtils {
   }
 
   private static void log(String tag, String msg, LogLevel level){
-    if (WXEnvironment.isApkDebugable() && msg != null && WXEnvironment.sLogLevel.compare(level) >= 0) {
-      Log.println(level.getPriority(),tag, msg);
-      writeConsoleLog(level.getName(), msg);
-      sendLog(level, msg);
-    }
-    if (sLogWatcher != null) {
-      sLogWatcher.onLog(level.getName(), tag, msg);
+    if (msg != null && WXEnvironment.sLogLevel.compare(level) >= 0) {
+      if (sLogWatcher != null ) {
+        sLogWatcher.onLog(level.getName(), tag, msg);
+      }else{
+        Log.println(level.getPriority(),tag, msg);
+      }
+
+      // if not debug level then print log
+      if(WXEnvironment.isApkDebugable() && !level.getName().equals("debug")){
+		writeConsoleLog(level.getName(), msg);
+		sendLog(level, msg);
+	  }
     }
   }
 
@@ -114,13 +119,8 @@ public class WXLogUtils {
   }
 
   public static void d(String tag, String msg) {
-    if (!TextUtils.isEmpty(msg) && !TextUtils.isEmpty(tag)) {
-      log(tag, msg, LogLevel.DEBUG);
-    }
 
     if (WXEnvironment.isApkDebugable() && !TextUtils.isEmpty(msg) && WXEnvironment.sLogLevel.compare(LogLevel.DEBUG) >= 0) {
-      Log.d(tag, msg);
-
       if ("jsLog".equals(tag) && jsLogWatcher != null) {
         if (msg.endsWith("__DEBUG")) {
           jsLogWatcher.onJsLog(Log.DEBUG, msg.replace("__DEBUG", ""));
@@ -214,15 +214,13 @@ public class WXLogUtils {
   }
 
   public static void w(String prefix, Throwable e) {
-    if (WXEnvironment.isApkDebugable()) {
       w(prefix + getStackTrace(e));
-    }
+
   }
 
   public static void e(String prefix, Throwable e) {
-    if (WXEnvironment.isApkDebugable()) {
       e(prefix + getStackTrace(e));
-    }
+
   }
 
   public static void wtf(String prefix, Throwable e){

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
index a7fba8a..827cc94 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
@@ -32,6 +32,7 @@ import com.taobao.weex.common.WXErrorCode;
 import com.taobao.weex.common.WXPerformance;
 
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -68,6 +69,8 @@ public class WXSoInstallMgrSdk {
   private final static String ARMEABI = "armeabi"; //default
   private final static String X86 = "x86";
   private final static String MIPS = "mips";
+  private final static String STARTUPSO = "/libweexjsb.so";
+  private final static String STARTUPSOANDROID15 = "/libweexjst.so";
 
   private final static int ARMEABI_Size = 3583820;
   private final static int X86_Size = 4340864;
@@ -111,6 +114,9 @@ public class WXSoInstallMgrSdk {
       return false;
     }
 
+    // copy startup so
+    copyStartUpSo();
+
     boolean InitSuc = false;
     if (checkSoIsValid(libName, BuildConfig.ARMEABI_Size) ||checkSoIsValid(libName, BuildConfig.X86_Size)) {
 
@@ -170,6 +176,69 @@ public class WXSoInstallMgrSdk {
     return InitSuc;
   }
 
+  /**
+   * copyStartUpSo
+   */
+  public static void copyStartUpSo() {
+    try {
+      boolean installOnSdcard = true;
+      String pkgName = WXEnvironment.getApplication().getPackageName();
+      // cp weexjsb any way
+//      try {
+//        PackageManager pm = WXEnvironment.getApplication().getApplicationContext().getPackageManager();
+//        ApplicationInfo appInfo = pm.getApplicationInfo(pkgName, 0);
+//        if ((appInfo.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0) {
+//          // App on sdcard
+//          installOnSdcard = true;
+//        }
+//      } catch (Throwable e) {
+//      }
+
+      if (installOnSdcard) {
+
+        String cacheFile = WXEnvironment.getApplication().getApplicationContext().getCacheDir().getPath();
+        // if android api < 16 copy libweexjst.so else copy libweexjsb.so
+        boolean pieSupport = true;
+        File newfile;
+        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
+          pieSupport = false;
+          newfile = new File(cacheFile + STARTUPSOANDROID15);
+        } else {
+          newfile = new File(cacheFile + STARTUPSO);
+        }
+        if (newfile.exists()) {
+          return;
+        }
+
+        String path = "/data/data/" + pkgName + "/lib";
+        if (cacheFile != null && cacheFile.indexOf("/cache") > 0) {
+          path = cacheFile.replace("/cache", "/lib");
+        }
+
+        String soName;
+        if (pieSupport) {
+          soName = path + STARTUPSO;
+        } else {
+          soName = path + STARTUPSOANDROID15;
+        }
+
+        File oldfile = new File(soName);
+        if (oldfile.exists()) {
+          FileInputStream inputStream = new FileInputStream(oldfile);
+          byte[] data = new byte[1024];
+          FileOutputStream outputStream =new FileOutputStream(newfile);
+          while (inputStream.read(data) != -1) {
+            outputStream.write(data);
+          }
+          inputStream.close();
+          outputStream.close();
+        }
+      }
+    } catch (Throwable e) {
+      e.printStackTrace();
+    }
+  }
+
   private static String _getFieldReflectively(Build build, String fieldName) {
     try {
       final Field field = Build.class.getField(fieldName);

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
index 7d11d5a..4a1b304 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXViewUtils.java
@@ -378,7 +378,7 @@ public class WXViewUtils {
   public static void clipCanvasWithinBorderBox(View targetView, Canvas canvas) {
     Drawable drawable;
     if (clipCanvasDueToAndroidVersion(canvas) &&
-        clipCanvasIfAnimationExist() &&
+        clipCanvasIfAnimationExist(targetView) &&
         ((drawable = targetView.getBackground()) instanceof BorderDrawable)) {
       BorderDrawable borderDrawable = (BorderDrawable) drawable;
       if (borderDrawable.isRounded()) {
@@ -394,7 +394,7 @@ public class WXViewUtils {
   public static void clipCanvasWithinBorderBox(Widget widget, Canvas canvas) {
     BorderDrawable borderDrawable;
     if (clipCanvasDueToAndroidVersion(canvas) &&
-        clipCanvasIfAnimationExist() &&
+        clipCanvasIfAnimationExist(null) &&
         (borderDrawable=widget.getBackgroundAndBorder())!=null ) {
       if (borderDrawable.isRounded() && clipCanvasIfBackgroundImageExist(widget, borderDrawable)) {
           Path path = borderDrawable.getContentPath(
@@ -424,8 +424,25 @@ public class WXViewUtils {
    * As animation will not cause redraw if hardware-acceleration enabled, clipCanvas feature has
    * to be disabled when API level is 24 without considering the animation property.
    */
-  private static boolean clipCanvasIfAnimationExist() {
-    return Build.VERSION.SDK_INT != VERSION_CODES.N;
+  private static boolean clipCanvasIfAnimationExist(View targetView) {
+    if (Build.VERSION.SDK_INT != VERSION_CODES.N) {
+      return true;
+    }
+    if(targetView != null &&
+            targetView.getScaleX() == 1 &&
+            targetView.getScaleY() == 1 &&
+            targetView.getTranslationX() == 0 &&
+            targetView.getTranslationY() == 0 &&
+            targetView.getRotation() == 0 &&
+            targetView.getRotationX() == 0 &&
+            targetView.getRotationY() == 0) {
+      if(Build.VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP && targetView.getTranslationZ() != 0 ) {
+        return false;
+      } else {
+        return true;
+      }
+    }
+    return false;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java b/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java
index 3fde10a..e249c1c 100644
--- a/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/utils/WXLogUtilsTest.java
@@ -20,6 +20,7 @@ package com.taobao.weex.utils;
 
 import com.taobao.weappplus_sdk.BuildConfig;
 import com.taobao.weex.WXEnvironment;
+
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -91,4 +92,17 @@ public class WXLogUtilsTest {
     Log.e("tag",new Throwable("test"));
   }
 
-}
+  @Test
+  public void testLogLevel() throws Exception {
+    WXEnvironment.sLogLevel = LogLevel.DEBUG;
+    Log.d("LogLevel.DEBUG", "test debug");
+    Log.w("LogLevel.DEBUG", "test warning");
+    Log.e("LogLevel.DEBUG", "test error");
+
+    WXEnvironment.sLogLevel = LogLevel.WARN;
+
+    Log.d("LogLevel.WARN", "test debug");
+    Log.w("LogLevel.WARN", "test warning");
+    Log.e("LogLevel.WARN", "test error");
+  }
+  }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java b/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
index e981c69..5b6d273 100644
--- a/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/utils/WXUtilsTest.java
@@ -19,6 +19,7 @@
 package com.taobao.weex.utils;
 
 import android.text.TextUtils;
+import android.util.Log;
 
 import com.taobao.weappplus_sdk.BuildConfig;
 import com.taobao.weex.WXEnvironment;
@@ -49,7 +50,7 @@ import static org.mockito.Matchers.any;
 @RunWith(PowerMockRunner.class)
 @Config(constants = BuildConfig.class, sdk = 19)
 @PowerMockIgnore( {"org.mockito.*", "org.robolectric.*", "android.*"})
-@PrepareForTest( {WXEnvironment.class, WXViewUtils.class, WXSDKInstance.class, TextUtils.class})
+@PrepareForTest( {WXEnvironment.class, WXViewUtils.class, WXSDKInstance.class, TextUtils.class, Log.class, WXUtils.class, WXLogUtils.class})
 public class WXUtilsTest extends TestCase {
 
     public static final float TEST_DENSITY = 3.0f;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
----------------------------------------------------------------------
diff --git a/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java b/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
index b686f7c..1343f60 100644
--- a/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
+++ b/android/weex_debug/src/main/java/com/taobao/weex/bridge/WXWebsocketBridge.java
@@ -204,6 +204,21 @@ public class WXWebsocketBridge implements IWXBridge,WXWebSocketManager.JSDebugge
     }
 
     @Override
+    public int initFrameworkEnv(String scriptsFramework,WXParams params, String cacheDir, boolean pieSupport) {
+        if (!mInit) {
+            return -1;
+        }
+
+        Map<String, Object> map = new HashMap<>();
+        map.put("method", "evalFramework");
+        ArrayList<String> args = new ArrayList<>();
+        args.add(scriptsFramework);
+        map.put("arguments", args);
+        WXWebSocketManager.getInstance().sendMessage(JSON.toJSONString(map));
+        return 0;
+    }
+
+    @Override
     public void takeHeapSnapshot(String filename) {}
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/dangerfile.js
----------------------------------------------------------------------
diff --git a/dangerfile.js b/dangerfile.js
index 97c4146..616f27a 100644
--- a/dangerfile.js
+++ b/dangerfile.js
@@ -273,6 +273,15 @@ filesToVerifySrcHeader.forEach(filepath => {
       return;
     }
   }
+
+  // check cn for source code
+  var reg = /[\u4e00-\u9FA5]+/; 
+  var res = reg.test(content);
+  if(res){
+    console.error("Code file "+ filepath +" has cn source code.");
+    fail("Code file "+ filepath +" has cn source code.");
+    return ;
+  }
 });
 
 
@@ -307,11 +316,12 @@ function findReviewer(resolve, reject) {
     number: danger.github.pr.number,
     headers: {Accept: 'application/vnd.github.diff',"user-agent": "node.js"}
   }, function (err, result) {
-    console.log('parseDeleteAndNormalLines')
     if ("undefined" === typeof result || "undefined" === typeof result.data || err) {
+      console.log('result:'+result+', error:'+err);
       resolve()
       return
     }
+    console.log('result:'+result);
     parseDeleteAndNormalLines(result.data, fileToDeletedLinesMap, fileToNormalLinesMap)
     console.log('getContent')
     var promises = danger.git.modified_files.map(function(file) {
@@ -366,21 +376,29 @@ function getContent(url) {
 
 function parseDeleteAndNormalLines(diffData, fileToDeletedLinesMap, fileToNormalLinesMap) {
   try {
+    console.log('parseDeleteAndNormalLines')
     var diffs = parseDiff(diffData)
-    diffs.forEach(diff => {
-      fileToDeletedLinesMap[diff.from] = [];
-      fileToNormalLinesMap[diff.from] = [];
-      diff.chunks.forEach(chunk => {
-        chunk.changes.forEach(change => {
-          if (change.del) {
-            fileToDeletedLinesMap[diff.from].push(change.ln)
-          }
-          if (change.normal) {
-            fileToNormalLinesMap[diff.from].push(change.ln1)
-          }
-        })
+    console.log('diffs:'+diffs)
+    if(diffs&&diffs instanceof Array){
+      diffs.forEach(diff => {
+        fileToDeletedLinesMap[diff.from] = [];
+        fileToNormalLinesMap[diff.from] = [];
+        if(diff&&diff.chunks&&diff.chunks instanceof Array){
+          diff.chunks.forEach(chunk => {
+            if(chunk&&chunk.changes&&chunk.changes instanceof Array){
+              chunk.changes.forEach(change => {
+                if (change&&change.del) {
+                  fileToDeletedLinesMap[diff.from].push(change.ln)
+                }
+                if (change&&change.normal) {
+                  fileToNormalLinesMap[diff.from].push(change.ln1)
+                }
+              })
+            }
+          })
+        }
       })
-    })
+    }
   } catch (error) {
     console.log(error)
   }
@@ -441,6 +459,7 @@ function findBlameReviewers(fileToDeletedLinesMap, fileToNormalLinesMap, fileToB
 
   console.log('blame point:', reviewers)
   var names = Object.keys(reviewers)
+  if(!names||!names instanceof Array||names.length<=0)return;
   names.sort((name1, name2) => {
     return reviewers[name1] > reviewers[name2] ? -1 : 1
   })

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/source/cn/guide/contributing.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/guide/contributing.md b/doc/source/cn/guide/contributing.md
index 36db1f9..fd3138d 100644
--- a/doc/source/cn/guide/contributing.md
+++ b/doc/source/cn/guide/contributing.md
@@ -25,23 +25,24 @@ version: 2.1
 ## 分支管理 (英)
 
 ```
-master
+release
  ↑
-dev         <--- PR(hotfix/typo/3rd-PR)
- ↑ PR
-{domain}-feature-{date}
+{version}
+ ↑
+master         <--- PR(feature/hotfix/typo)
 ```
 
 0. `master` branch
-    0. `master` is the latest (pre-)release branch.
-0. `dev` branch
-    0. `dev` is the stable developing branch.
-    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `dev`***.
-0. `{domain}-feature-{date}` branch
-    0. The branch for a developing iteration, e.g. `android-feature-20160607` is an android developing iteration which is done at 2016.06.07. `{domain}` consists of `android`, `ios`, `jsfm` and `html5`. 
-    0. **DO NOT commit any PR to such a branch**.
-
-### 分支命名
+    0. `master` is the stable developing branch.
+    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `master `***.
+0. `{version}` branch
+    0. `{version}` is used for every version which we consider for stable publish.
+    0. e.g. `v0.16`
+0. `release` branch
+    0. `release` is the latest release branch,we will make tag and publish version on this branch.
+
+### 用于PR的分支命名
+
 
 ```
 {module}-{action}-{shortName}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/source/guide/contributing.md
----------------------------------------------------------------------
diff --git a/doc/source/guide/contributing.md b/doc/source/guide/contributing.md
index ea824f4..00cb979 100644
--- a/doc/source/guide/contributing.md
+++ b/doc/source/guide/contributing.md
@@ -25,23 +25,23 @@ Besides Weex dev mailing list, we also have some other mailing lists for you. Yo
 ## Branch Management
 
 ```
-master
+release
  ↑
-dev         <--- PR(hotfix/typo/3rd-PR)
- ↑ PR
-{domain}-feature-{date}
+{version}
+ ↑
+master         <--- PR(feature/hotfix/typo)
 ```
 
 0. `master` branch
-    0. `master` is the latest (pre-)release branch.
-0. `dev` branch
-    0. `dev` is the stable developing branch.
-    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `dev`***.
-0. `{domain}-feature-{date}` branch
-    0. The branch for a developing iteration, e.g. `android-feature-20160607` is an android developing iteration which is done at 2016.06.07. `{domain}` consists of `android`, `ios`, `jsfm` and `html5`. 
-    0. **DO NOT commit any PR to such a branch**.
-
-### Branch Name 
+    0. `master` is the stable developing branch.
+    0. ***It's RECOMMENDED to commit hotfix (like typo) or feature PR to `master `***.
+0. `{version}` branch
+    0. `{version}` is used for every version which we consider for stable publish.
+    0. e.g. `v0.16`
+0. `release` branch
+    0. `release` is the latest release branch,we will make tag and publish version on this branch.
+
+### Branch Name For PR
 
 ```
 {module}-{action}-{shortName}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/source/references/platform-difference.md
----------------------------------------------------------------------
diff --git a/doc/source/references/platform-difference.md b/doc/source/references/platform-difference.md
new file mode 100644
index 0000000..0aadfae
--- /dev/null
+++ b/doc/source/references/platform-difference.md
@@ -0,0 +1,11 @@
+---
+title: Platform Differences Between Weex and Web
+type: references
+order: 12
+version: 2.1
+has_chapter_content: true
+---
+
+# Platform Differences Between Weex and Web
+
+Work in progresss.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/source/references/platfrom-difference.md
----------------------------------------------------------------------
diff --git a/doc/source/references/platfrom-difference.md b/doc/source/references/platfrom-difference.md
deleted file mode 100644
index 0aadfae..0000000
--- a/doc/source/references/platfrom-difference.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Platform Differences Between Weex and Web
-type: references
-order: 12
-version: 2.1
-has_chapter_content: true
----
-
-# Platform Differences Between Weex and Web
-
-Work in progresss.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/source/references/vue/difference-with-web.md
----------------------------------------------------------------------
diff --git a/doc/source/references/vue/difference-with-web.md b/doc/source/references/vue/difference-with-web.md
index 2af11f9..b750591 100644
--- a/doc/source/references/vue/difference-with-web.md
+++ b/doc/source/references/vue/difference-with-web.md
@@ -9,7 +9,7 @@ version: 2.1
 
 ## Platform Differences
 
-Vue.js was designed for the Web platform at the begining. Although it can be based on Weex to develop native applications, there are still many differences between web and native. See [Platform Differences Between Weex and Web](../ platform-difference.html) for more details.
+Vue.js was designed for the Web platform at the begining. Although it can be based on Weex to develop native applications, there are still many differences between web and native. See [Platform Differences Between Weex and Web](../platform-difference.html) for more details.
 
 Due to those differences, Weex doesn't support those features in Vue.js (mostly are DOM-related):
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/themes/weex/layout/_partial/article.ejs
----------------------------------------------------------------------
diff --git a/doc/themes/weex/layout/_partial/article.ejs b/doc/themes/weex/layout/_partial/article.ejs
index 3ee5b2a..e7052b7 100644
--- a/doc/themes/weex/layout/_partial/article.ejs
+++ b/doc/themes/weex/layout/_partial/article.ejs
@@ -8,4 +8,6 @@
   <% if (page_type === 'article') { %>
      <%- partial('_partial/post/nav') %>
   <% } %>
+  <%- partial('footer') %>
+  <%- partial('after-footer') %>
 </article>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/themes/weex/layout/index.ejs
----------------------------------------------------------------------
diff --git a/doc/themes/weex/layout/index.ejs b/doc/themes/weex/layout/index.ejs
index 4a1ad87..b713fd4 100644
--- a/doc/themes/weex/layout/index.ejs
+++ b/doc/themes/weex/layout/index.ejs
@@ -250,6 +250,9 @@
   </div>
 </div>
 <a href="javascript:;" id="back2top" class="back2top"><span class="iconfont icon-arrow-small"></span></a>
+<%- partial('_partial/footer') %>
+<%- partial('_partial/after-footer') %>
+
 <%- js('js/swiper.min') %>
 <%- js('js/velocity.js') %>
 <script>

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/themes/weex/layout/layout.ejs
----------------------------------------------------------------------
diff --git a/doc/themes/weex/layout/layout.ejs b/doc/themes/weex/layout/layout.ejs
index df3b12b..ba6dee3 100644
--- a/doc/themes/weex/layout/layout.ejs
+++ b/doc/themes/weex/layout/layout.ejs
@@ -9,8 +9,6 @@
   <%- partial('_partial/sidebar', {post: page, page_type: page_type}) %>
   <%- body %>
   
-  <%- partial('_partial/footer') %>
-  <%- partial('_partial/after-footer') %>
   <%- js('js/reqwest.js') %>
   <%- js('js/common.js') %>
   <% if (config.docsearch.enable){ %>    

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/themes/weex/source/css/common.scss
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/css/common.scss b/doc/themes/weex/source/css/common.scss
index 10c25cf..d03be9f 100644
--- a/doc/themes/weex/source/css/common.scss
+++ b/doc/themes/weex/source/css/common.scss
@@ -17,9 +17,9 @@ html, body {
 }
 
 body {
-  background: $bg-gray;
+  background: $bg-white;
   // font-family: Exo,'-apple-system','Open Sans',HelveticaNeue-Light,'Helvetica Neue Light','Helvetica Neue','Hiragino Sans GB','Microsoft YaHei',Helvetica,Arial,sans-serif;
-  font-family: Lato, "Microsoft Jhenghei", "Hiragino Sans GB", "Microsoft YaHei", sans-serif,'-apple-system','Open Sans',HelveticaNeue-Light,'Helvetica Neue Light';
+  font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
   // font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei',sans-serif;
   // font-size:62.5%;max-height:100%;
   font-size: 14px;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/themes/weex/source/css/partial/header.scss
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/css/partial/header.scss b/doc/themes/weex/source/css/partial/header.scss
index ac02f1a..a45d8f7 100644
--- a/doc/themes/weex/source/css/partial/header.scss
+++ b/doc/themes/weex/source/css/partial/header.scss
@@ -6,7 +6,7 @@
   padding: 0 40px;
   position: fixed;
   background-color: rgba(255, 255, 255, .95);
-  box-shadow: 3px 2px 4px 0 rgba(0,0,0,0.12);
+  box-shadow: 0 0 1px rgba(0,0,0,0.25);
   top: 0;
   left: 0;
   right: 0;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/themes/weex/source/css/post.scss
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/css/post.scss b/doc/themes/weex/source/css/post.scss
index f3a6544..370d90c 100644
--- a/doc/themes/weex/source/css/post.scss
+++ b/doc/themes/weex/source/css/post.scss
@@ -50,14 +50,15 @@
   }
 
   .doc-nav {
-    position: absolute;
+    position: fixed;
     top: 72px;
     left: 0;
     bottom: 0;
-    background: $bg-gray;
+    width: 260px;
+    padding: 40px 20px 60px 60px;
+    background: $bg-white;
     width: 300px;
     z-index: 999;
-    padding: 43px 15px 15px;
     overflow-x: hidden;
     overflow-y: auto;
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/doc/themes/weex/source/css/variable.scss
----------------------------------------------------------------------
diff --git a/doc/themes/weex/source/css/variable.scss b/doc/themes/weex/source/css/variable.scss
index 50e35cd..cbe4b12 100644
--- a/doc/themes/weex/source/css/variable.scss
+++ b/doc/themes/weex/source/css/variable.scss
@@ -6,7 +6,7 @@ $text-light-black: #333;
 $text-black: #333;
 $text-white: #fff;
 $text-gray: #999;
-$text-blue: #00BDFF;
+$text-blue: #088bc3;
 $bg-blue: $text-blue;
 $bg-light-blue: #23CEFD;
 $bg-white: #fff;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/html5/runtime/api/WeexInstance.js
----------------------------------------------------------------------
diff --git a/html5/runtime/api/WeexInstance.js b/html5/runtime/api/WeexInstance.js
new file mode 100644
index 0000000..2093f17
--- /dev/null
+++ b/html5/runtime/api/WeexInstance.js
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import Document from '../vdom/Document'
+import { isRegisteredModule, getModuleDescription } from './module'
+import { isRegisteredComponent } from './component'
+
+const moduleProxies = {}
+
+function setId (weex, id) {
+  Object.defineProperty(weex, '[[CurrentInstanceId]]', { value: id })
+}
+
+function getId (weex) {
+  return weex['[[CurrentInstanceId]]']
+}
+
+function moduleGetter (module, method, taskCenter) {
+  return (...args) => taskCenter.send('module', { module, method }, args)
+}
+
+export default class WeexInstance {
+  constructor (id, config) {
+    setId(this, id)
+    this.config = config || {}
+    this.document = new Document(id, this.config.bundleUrl)
+    this.requireModule = this.requireModule.bind(this)
+    this.isRegisteredModule = isRegisteredModule
+    this.isRegisteredComponent = isRegisteredComponent
+  }
+
+  requireModule (moduleName) {
+    const id = getId(this)
+    if (!(id && this.document && this.document.taskCenter)) {
+      console.error(`[JS Framework] invalid instance id "${id}"`)
+      return
+    }
+
+    // warn for unknown module
+    if (!isRegisteredModule(moduleName)) {
+      console.warn(`[JS Framework] using unregistered weex module "${moduleName}"`)
+      return
+    }
+
+    // create new module proxy
+    if (!moduleProxies[moduleName]) {
+      const moduleDefine = getModuleDescription(moduleName)
+      const taskCenter = this.document.taskCenter
+
+      // create registered module apis
+      const moduleApis = {}
+      for (const methodName in moduleDefine) {
+        Object.defineProperty(moduleApis, methodName, {
+          enumerable: true,
+          configurable: true,
+          get: () => moduleGetter(moduleName, methodName, taskCenter),
+          set (fn) {
+            if (typeof fn === 'function') {
+              return taskCenter.send('module', {
+                module: moduleName,
+                method: methodName
+              }, [fn])
+            }
+          }
+        })
+      }
+
+      // create module Proxy
+      if (typeof Proxy === 'function') {
+        moduleProxies[moduleName] = new Proxy(moduleApis, {
+          get (target, methodName) {
+            if (methodName in target) {
+              return target[methodName]
+            }
+            console.warn(`[JS Framework] using unregistered method "${moduleName}.${methodName}"`)
+            return moduleGetter(moduleName, methodName, taskCenter)
+          }
+        })
+      }
+      else {
+        moduleProxies[moduleName] = moduleApis
+      }
+    }
+
+    return moduleProxies[moduleName]
+  }
+
+  supports (condition) {
+    if (typeof condition !== 'string') return null
+
+    const res = condition.match(/^@(\w+)\/(\w+)(\.(\w+))?$/i)
+    if (res) {
+      const type = res[1]
+      const name = res[2]
+      const method = res[4]
+      switch (type) {
+        case 'module': return isRegisteredModule(name, method)
+        case 'component': return isRegisteredComponent(name)
+      }
+    }
+
+    return null
+  }
+
+  // registerStyleSheet (styles) {
+  //   if (this.document) {
+  //     this.document.registerStyleSheet(styles)
+  //   }
+  // }
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/html5/runtime/api/component.js
----------------------------------------------------------------------
diff --git a/html5/runtime/api/component.js b/html5/runtime/api/component.js
new file mode 100644
index 0000000..8a56961
--- /dev/null
+++ b/html5/runtime/api/component.js
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { registerElement } from '../vdom/WeexElement'
+
+const weexComponents = {}
+
+/**
+ * Register native components information.
+ * @param {array} newComponents
+ */
+export function registerComponents (newComponents) {
+  if (Array.isArray(newComponents)) {
+    newComponents.forEach(component => {
+      if (!component) {
+        return
+      }
+      if (typeof component === 'string') {
+        weexComponents[component] = true
+      }
+      else if (typeof component === 'object' && typeof component.type === 'string') {
+        weexComponents[component.type] = component
+        registerElement(component.type, component.methods)
+      }
+    })
+  }
+}
+
+/**
+ * Check whether the component has been registered.
+ * @param {String} component name
+ */
+export function isRegisteredComponent (name) {
+  return !!weexComponents[name]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/html5/runtime/api/init.js
----------------------------------------------------------------------
diff --git a/html5/runtime/api/init.js b/html5/runtime/api/init.js
index 024afa7..cad0179 100644
--- a/html5/runtime/api/init.js
+++ b/html5/runtime/api/init.js
@@ -18,8 +18,10 @@
  */
 
 import { init as initTaskHandler } from '../bridge/TaskCenter'
-import { registerElement } from '../vdom/WeexElement'
+import { registerModules } from './module'
+import { registerComponents } from './component'
 import { services, register, unregister } from './service'
+import WeexInstance from './WeexInstance'
 
 let frameworks
 let runtimeConfig
@@ -95,58 +97,61 @@ function createInstance (id, code, config, data) {
   config = JSON.parse(JSON.stringify(config || {}))
   config.env = JSON.parse(JSON.stringify(global.WXEnvironment || {}))
 
-  const context = {
-    config,
+  const weex = new WeexInstance(id, config)
+  Object.freeze(weex)
+
+  const runtimeEnv = {
+    weex,
+    config, // TODO: deprecated
     created: Date.now(),
     framework: bundleType
   }
-  context.services = createServices(id, context, runtimeConfig)
-  instanceMap[id] = context
+  runtimeEnv.services = createServices(id, runtimeEnv, runtimeConfig)
+  instanceMap[id] = runtimeEnv
 
-  if (process.env.NODE_ENV === 'development') {
-    console.debug(`[JS Framework] create an ${bundleType} instance`)
-  }
+  const runtimeContext = Object.create(null)
+  Object.assign(runtimeContext, runtimeEnv.services, { weex })
 
-  const fm = frameworks[bundleType]
-  if (!fm) {
+  const framework = runtimeConfig.frameworks[bundleType]
+  if (!framework) {
     return new Error(`invalid bundle type "${bundleType}".`)
   }
 
-  return fm.createInstance(id, code, config, data, context)
-}
-
-const methods = {
-  createInstance,
-  registerService: register,
-  unregisterService: unregister
+  // run create instance
+  if (typeof framework.prepareInstanceContext === 'function') {
+    const instanceContext = framework.prepareInstanceContext(runtimeContext)
+    return runInContext(code, instanceContext)
+  }
+  return framework.createInstance(id, code, config, data, runtimeEnv)
 }
 
 /**
- * Register methods which init each frameworks.
- * @param {string} methodName
+ * Run js code in a specific context.
+ * @param {string} code
+ * @param {object} context
  */
-function genInit (methodName) {
-  methods[methodName] = function (...args) {
-    if (methodName === 'registerComponents') {
-      checkComponentMethods(args[0])
-    }
-    for (const name in frameworks) {
-      const framework = frameworks[name]
-      if (framework && framework[methodName]) {
-        framework[methodName](...args)
-      }
-    }
+function runInContext (code, context) {
+  const keys = []
+  const args = []
+  for (const key in context) {
+    keys.push(key)
+    args.push(context[key])
   }
+
+  const bundle = `
+    (function (global) {
+      "use strict";
+      ${code}
+    })(Object.create(this))
+  `
+
+  return (new Function(...keys, bundle))(...args)
 }
 
-function checkComponentMethods (components) {
-  if (Array.isArray(components)) {
-    components.forEach((name) => {
-      if (name && name.type && name.methods) {
-        registerElement(name.type, name.methods)
-      }
-    })
-  }
+const methods = {
+  createInstance,
+  registerService: register,
+  unregisterService: unregister
 }
 
 /**
@@ -203,6 +208,27 @@ function adaptInstance (methodName, nativeMethodName) {
   }
 }
 
+/**
+ * Register methods which init each frameworks.
+ * @param {string} methodName
+ * @param {function} sharedMethod
+ */
+function adaptMethod (methodName, sharedMethod) {
+  methods[methodName] = function (...args) {
+    if (typeof sharedMethod === 'function') {
+      sharedMethod(...args)
+    }
+
+    // TODO: deprecated
+    for (const name in runtimeConfig.frameworks) {
+      const framework = runtimeConfig.frameworks[name]
+      if (framework && framework[methodName]) {
+        framework[methodName](...args)
+      }
+    }
+  }
+}
+
 export default function init (config) {
   runtimeConfig = config || {}
   frameworks = runtimeConfig.frameworks || {}
@@ -216,8 +242,9 @@ export default function init (config) {
     framework.init(config)
   }
 
-  // @todo: The method `registerMethods` will be re-designed or removed later.
-  ; ['registerComponents', 'registerModules', 'registerMethods'].forEach(genInit)
+  adaptMethod('registerComponents', registerComponents)
+  adaptMethod('registerModules', registerModules)
+  adaptMethod('registerMethods')
 
   ; ['destroyInstance', 'refreshInstance', 'receiveTasks', 'getRoot'].forEach(genInstance)
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/html5/runtime/api/module.js
----------------------------------------------------------------------
diff --git a/html5/runtime/api/module.js b/html5/runtime/api/module.js
new file mode 100644
index 0000000..df26b92
--- /dev/null
+++ b/html5/runtime/api/module.js
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+const weexModules = {}
+
+/**
+ * Register native modules information.
+ * @param {object} newModules
+ */
+export function registerModules (newModules) {
+  for (const name in newModules) {
+    if (!weexModules[name]) {
+      weexModules[name] = {}
+    }
+    newModules[name].forEach(method => {
+      if (typeof method === 'string') {
+        weexModules[name][method] = true
+      }
+      else {
+        weexModules[name][method.name] = method.args
+      }
+    })
+  }
+}
+
+/**
+ * Check whether the module or the method has been registered.
+ * @param {String} module name
+ * @param {String} method name (optional)
+ */
+export function isRegisteredModule (name, method) {
+  if (typeof method === 'string') {
+    return !!(weexModules[name] && weexModules[name][method])
+  }
+  return !!weexModules[name]
+}
+
+export function getModuleDescription (name) {
+  return weexModules[name]
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/html5/runtime/vdom/Element.js
----------------------------------------------------------------------
diff --git a/html5/runtime/vdom/Element.js b/html5/runtime/vdom/Element.js
index 6663b51..15837f2 100644
--- a/html5/runtime/vdom/Element.js
+++ b/html5/runtime/vdom/Element.js
@@ -409,7 +409,7 @@ export default class Element extends Node {
 
     if (!isStopPropagation
       && isBubble
-      && BUBBLE_EVENTS.includes(type)
+      && (BUBBLE_EVENTS.indexOf(type) !== -1)
       && this.parentNode
       && this.parentNode.fireEvent) {
       event.currentTarget = this.parentNode

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 8addaca..749cb8c 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -264,6 +264,10 @@
 		77E65A161C155EB5008B8775 /* WXTextComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E65A141C155EB5008B8775 /* WXTextComponent.m */; };
 		77E65A191C155F25008B8775 /* WXScrollerComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 77E65A171C155F25008B8775 /* WXScrollerComponent.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		77E65A1A1C155F25008B8775 /* WXScrollerComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E65A181C155F25008B8775 /* WXScrollerComponent.m */; };
+		841CD1031F9739890081196D /* WXExceptionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 841CD1021F9739890081196D /* WXExceptionUtils.m */; };
+		841CD1051F974DFA0081196D /* WXExceptionUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 841CD1041F97399C0081196D /* WXExceptionUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		841CD1061F974DFA0081196D /* WXExceptionUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 841CD1041F97399C0081196D /* WXExceptionUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		841CD1071F974E000081196D /* WXExceptionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 841CD1021F9739890081196D /* WXExceptionUtils.m */; };
 		C401945E1E344E8300D19C31 /* WXFloatCompareTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C401945D1E344E8300D19C31 /* WXFloatCompareTests.m */; };
 		C41E1A971DC1FD15009C7F90 /* WXDatePickerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */; };
 		C41E1A981DC1FD15009C7F90 /* WXDatePickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */; };
@@ -851,6 +855,8 @@
 		77E65A141C155EB5008B8775 /* WXTextComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXTextComponent.m; sourceTree = "<group>"; };
 		77E65A171C155F25008B8775 /* WXScrollerComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXScrollerComponent.h; sourceTree = "<group>"; };
 		77E65A181C155F25008B8775 /* WXScrollerComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXScrollerComponent.m; sourceTree = "<group>"; };
+		841CD1021F9739890081196D /* WXExceptionUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXExceptionUtils.m; sourceTree = "<group>"; };
+		841CD1041F97399C0081196D /* WXExceptionUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXExceptionUtils.h; sourceTree = "<group>"; };
 		C401945D1E344E8300D19C31 /* WXFloatCompareTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXFloatCompareTests.m; sourceTree = "<group>"; };
 		C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXDatePickerManager.h; sourceTree = "<group>"; };
 		C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXDatePickerManager.m; sourceTree = "<group>"; };
@@ -1082,6 +1088,8 @@
 				2AAFC1B41C48DFF70026D2FE /* WXSDKError.h */,
 				749DC2791D40827B009E1C91 /* WXMonitor.h */,
 				749DC27A1D40827B009E1C91 /* WXMonitor.m */,
+				841CD1041F97399C0081196D /* WXExceptionUtils.h */,
+				841CD1021F9739890081196D /* WXExceptionUtils.m */,
 			);
 			name = Monitor;
 			path = WeexSDK/Sources/Monitor;
@@ -1602,6 +1610,7 @@
 				DCA0EF641D6EED6F00CB18B9 /* WXGlobalEventModule.h in Headers */,
 				2A837AB21CD9DE9200AEDF03 /* WXLoadingComponent.h in Headers */,
 				DCA446271EFA5DAF00D0CFA8 /* WeexSDK.h in Headers */,
+				841CD1051F974DFA0081196D /* WXExceptionUtils.h in Headers */,
 				C42E8F9B1F39DF07001EBE9D /* WXTracingProtocol.h in Headers */,
 				7423899F1C32733800D748CA /* WXType.h in Headers */,
 				59A582FC1CF5B17B0081FD3E /* WXBridgeContext.h in Headers */,
@@ -1793,6 +1802,7 @@
 				DCA445D51EFA598200D0CFA8 /* WXComponent+PseudoClassManagement.h in Headers */,
 				DCA4460E1EFA5A7E00D0CFA8 /* WXLength.h in Headers */,
 				DCA445FA1EFA5A3A00D0CFA8 /* WXNavigatorModule.h in Headers */,
+				841CD1061F974DFA0081196D /* WXExceptionUtils.h in Headers */,
 				DCA446081EFA5A6A00D0CFA8 /* NSArray+Weex.h in Headers */,
 				74B81AE51F73C3E900D3A61D /* WXRecycleListDataManager.h in Headers */,
 				DCA445F21EFA5A2300D0CFA8 /* WXHeaderComponent.h in Headers */,
@@ -2200,6 +2210,7 @@
 				7463192A1C71B92600EFEBD4 /* WXModalUIModule.m in Sources */,
 				77D161501C02E3880010B15B /* WXUtility.m in Sources */,
 				74A4BA9F1CB3C0A100195969 /* WXHandlerFactory.m in Sources */,
+				841CD1031F9739890081196D /* WXExceptionUtils.m in Sources */,
 				C4E97D341F1EF46D00ABC314 /* WXTracingManager.m in Sources */,
 				742AD72F1DF98C45007DC46C /* WXResourceRequest.m in Sources */,
 				7461F8931CFB373100F62D44 /* WXLayer.m in Sources */,
@@ -2278,6 +2289,7 @@
 				DCA4455E1EFA55B300D0CFA8 /* WXFooterComponent.m in Sources */,
 				DCA4455F1EFA55B300D0CFA8 /* WXNavigationDefaultImpl.m in Sources */,
 				74B81AF21F73C3E900D3A61D /* WXJSASTParser.mm in Sources */,
+				841CD1071F974E000081196D /* WXExceptionUtils.m in Sources */,
 				DCA445601EFA55B300D0CFA8 /* WXURLRewriteDefaultImpl.m in Sources */,
 				DCA445611EFA55B300D0CFA8 /* WXPrerenderManager.m in Sources */,
 				DCA445631EFA55B300D0CFA8 /* WXPickerModule.m in Sources */,

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
index 7985fe5..24801cc 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
@@ -40,6 +40,7 @@
 #import "WXSDKInstance_private.h"
 #import "WXPrerenderManager.h"
 #import "WXTracingManager.h"
+#import "WXExceptionUtils.h"
 
 #define SuppressPerformSelectorLeakWarning(Stuff) \
 do { \
@@ -506,8 +507,10 @@ _Pragma("clang diagnostic pop") \
     WX_MONITOR_PERF_END(WXPTFrameworkExecute);
     
     if ([self.jsBridge exception]) {
-        NSString *message = [NSString stringWithFormat:@"JSFramework executes error: %@", [self.jsBridge exception]];
-        WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_EXECUTE, message);
+        NSString *exception = [[self.jsBridge exception] toString];
+        NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_SDK_INIT_JSFM_INIT_FAILED] %@",exception];
+        [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_SDK_INIT" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_SDK_INIT] function:@"" exception:errMsg extParams:nil];
+        WX_MONITOR_FAIL(WXMTJSFramework, WX_ERR_JSFRAMEWORK_EXECUTE, errMsg);
     } else {
         WX_MONITOR_SUCCESS(WXMTJSFramework);
         //the JSFramework has been load successfully.
@@ -568,8 +571,10 @@ _Pragma("clang diagnostic pop") \
         [self.jsBridge executeJavascript:script];
         
         if ([self.jsBridge exception]) {
-            NSString *message = [NSString stringWithFormat:@"JSService executes error: %@", [self.jsBridge exception]];
-            WX_MONITOR_FAIL(WXMTJSService, WX_ERR_JSFRAMEWORK_EXECUTE, message);
+            NSString *exception = [[self.jsBridge exception] toString];
+            NSMutableString *errMsg = [NSMutableString stringWithFormat:@"[WX_KEY_EXCEPTION_INVOKE_JSSERVICE_EXECUTE] %@",exception];
+            [WXExceptionUtils commitCriticalExceptionRT:@"WX_KEY_EXCEPTION_INVOKE" errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_INVOKE] function:@"" exception:errMsg extParams:nil];
+            WX_MONITOR_FAIL(WXMTJSService, WX_ERR_JSFRAMEWORK_EXECUTE, errMsg);
         } else {
             // success
         }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
index ec81b22..f076817 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
@@ -36,6 +36,7 @@
 #import "WXSDKManager.h"
 #import "WXExtendCallNativeManager.h"
 #import "WXTracingManager.h"
+#import "WXExceptionUtils.h"
 
 #import <dlfcn.h>
 
@@ -154,14 +155,17 @@
         
         _jsContext.exceptionHandler = ^(JSContext *context, JSValue *exception){
             context.exception = exception;
-            NSString *message = [NSString stringWithFormat:@"[%@:%@:%@] %@\n%@", exception[@"sourceURL"], exception[@"line"], exception[@"column"], exception, [exception[@"stack"] toObject]];
-            id<WXJSExceptionProtocol> jsExceptionHandler = [WXHandlerFactory handlerForProtocol:@protocol(WXJSExceptionProtocol)];
             
             WXSDKInstance *instance = [WXSDKEngine topInstance];
-            WXJSExceptionInfo * jsExceptionInfo = [[WXJSExceptionInfo alloc] initWithInstanceId:instance.instanceId bundleUrl:[instance.scriptURL absoluteString] errorCode:[NSString stringWithFormat:@"%d", WX_ERR_JS_EXECUTE] functionName:@"" exception:[NSString stringWithFormat:@"[%@:%@] %@\n%@ \njsMainBundleStringContentLength:%@\njsMainBundleStringContentMd5:%@",exception[@"line"], exception[@"column"],[exception toString], exception[@"stack"], instance.userInfo[@"jsMainBundleStringContentLength"]?:@"",instance.userInfo[@"jsMainBundleStringContentMd5"]?:@""] userInfo:nil];
-            if ([jsExceptionHandler respondsToSelector:@selector(onJSException:)]) {
-                [jsExceptionHandler onJSException:jsExceptionInfo];
-            }
+            NSString *bundleUrl = [instance.scriptURL absoluteString]?:@"WX_KEY_EXCEPTION_WXBRIDGE";
+            NSString *errorCode = [NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_WXBRIDGE];
+            NSString *message = [NSString stringWithFormat:@"[WX_KEY_EXCEPTION_WXBRIDGE] [%@:%@:%@] %@\n%@", exception[@"sourceURL"], exception[@"line"], exception[@"column"], [exception toString], [exception[@"stack"] toObject]];
+            NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+                instance.userInfo[@"jsMainBundleStringContentLength"]?:@"",@"jsMainBundleStringContentLength",
+                instance.userInfo[@"jsMainBundleStringContentMd5"]?:@"",@"jsMainBundleStringContentMd5",nil];
+            WXJSExceptionInfo * jsExceptionInfo = [[WXJSExceptionInfo alloc] initWithInstanceId:instance.instanceId bundleUrl:bundleUrl errorCode:errorCode functionName:@"" exception:message userInfo:userInfo];
+            
+            [WXExceptionUtils commitCriticalExceptionRT:jsExceptionInfo];
             WX_MONITOR_FAIL(WXMTJSBridge, WX_ERR_JS_EXECUTE, message);
             if (instance.onJSRuntimeException) {
                 instance.onJSRuntimeException(jsExceptionInfo);

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/28dd9f3b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
index 48eda1a..929dd1a 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
@@ -662,8 +662,8 @@ typedef NS_ENUM(NSInteger, Direction) {
     
     if (_sliderChangeEvent) {
         [self fireEvent:@"change" params:@{@"index":@(index)} domChanges:@{@"attrs": @{@"index": @(index)}}];
-        self.currentIndex = index;
     }
+    self.currentIndex = index;
 }
 
 - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView