This is an automated email from the ASF dual-hosted git repository.
kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex-site.git
The following commit(s) were added to refs/heads/master by this push:
new a2debf5 fix 309 (#566)
a2debf5 is described below
commit a2debf5e3788451aa1c3dc567f2b2f40cc6dad34
Author: 任跃兵 <[email protected]>
AuthorDate: Thu Dec 12 03:15:00 2019 -0600
fix 309 (#566)
---
docs/docs/api/js-service.md | 3 ++-
docs/zh/docs/api/js-service.md | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/docs/api/js-service.md b/docs/docs/api/js-service.md
index e8d30a6..818bbf7 100644
--- a/docs/docs/api/js-service.md
+++ b/docs/docs/api/js-service.md
@@ -11,7 +11,8 @@ version: 2.1
<span class="weex-version">v0.9.5+</span>
-JSService and Weex instance are parallel in js runtime. Weex instance's
lifecycle will invoke JSService's lifecycle. Currently provide create, refresh,
destroy of lifecycle.
+JSService and Weex instance are parallel in js runtime. Weex instance's
lifecycle will invoke JSService's lifecycle. Currently provide create, refresh,
destroy of lifecycle.
+JSService is the same as vendor.js in front-end engineer world, it is usually
used to move duplicated js function in each page to a global environment.
**!!!Important: Improper use of JSService may lead to increased memory usage
or global pollution !**
diff --git a/docs/zh/docs/api/js-service.md b/docs/zh/docs/api/js-service.md
index 4be6958..59e4ff6 100644
--- a/docs/zh/docs/api/js-service.md
+++ b/docs/zh/docs/api/js-service.md
@@ -11,7 +11,8 @@ version: 2.1
<span class="weex-version">v0.9.5+</span>
-JSService 和 Weex 实例在 JS Runtime 中并行运行。Weex 实例的生命周期可调用 JSService
生命周期。目前提供创建、刷新、销毁生命周期。
+JSService 和 Weex 实例在 JS Runtime 中并行运行。Weex 实例的生命周期可调用 JSService
生命周期。目前提供创建、刷新、销毁生命周期。
+JSService 和前端世界里的 vendor.js 一样,它通常用于将每个页面中的重复js函数移至全局环境。
**重要提醒: JSService 使用不当会导致内存增高或全局污染!**