Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Revise the argument of service.register (#194)
Browse files Browse the repository at this point in the history
* Revise the argument of `service.register`

Refer to apache/incubator-weex#1513

* Fix typo
  • Loading branch information
Hanks10100 committed Sep 29, 2018
1 parent 70347cc commit 177a977
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/cn/references/js-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ boolean result = WXSDKEngine.registerService(SERVICE_NAME, SERVICE_JS_CODE, opti

### Web
```html
<!-- 必须在 JSFM 之后加载 -->
<script src="SERVICE_JS_CODE_URL"></script>
```

Expand All @@ -47,9 +46,7 @@ boolean result = WXSDKEngine.registerService(SERVICE_NAME, SERVICE_JS_CODE, opti
## 编写一个 JS service

```javascript
// options: native inject options
// options.serviceName is native options name
service.register(options.serviceName, {
service.register(SERVICE_NAME /* same string with native */, {
/**
* JS Service lifecycle. JS Service `create` will before then each instance lifecycle `create`. The return param `instance` is Weex protected param. This object will return to instance global. Other params will in the `services` at instance.
*
Expand Down

0 comments on commit 177a977

Please sign in to comment.