[GitHub] incubator-weex-site pull request #135: Update document of the weex variable ...
Github user asfgit closed the pull request at: https://github.com/apache/incubator-weex-site/pull/135 ---
[GitHub] incubator-weex-site pull request #135: Update document of the weex variable ...
Github user varunsob commented on a diff in the pull request: https://github.com/apache/incubator-weex-site/pull/135#discussion_r181969706 --- Diff: source/references/weex-variable.md --- @@ -160,3 +160,36 @@ weex.supports('module/*') // null weex.supports('@stream/fetch') // null weex.supports('getComponentRect') // null ``` + +## `weex.isRegisteredModule` + +Detect whether the specific module or method is registered. + +```js +weex.weex.isRegisteredModule(moduleName: string, methodName: string): boolean +``` + +It can only be used to check the compatibility of the specific module or method, not support components. + +```js +weex.isRegisteredModule('stream') // true +weex.isRegisteredModule('stream', 'fetch') // true +weex.isRegisteredModule('whatever', '- unknown -') // false +weex.isRegisteredModule('div') // false, not support components +``` + +## `weex.isRegisteredComponent` + +Detect whether the specific component is registered. + +```js +weex.weex.isRegisteredComponent(componentName: string): boolean +``` + +It can only be used to check the compatibility of the specific component, not support modules. --- End diff -- It can only be used to check compatibility of a specific component. ---
[GitHub] incubator-weex-site pull request #135: Update document of the weex variable ...
Github user varunsob commented on a diff in the pull request: https://github.com/apache/incubator-weex-site/pull/135#discussion_r181969545 --- Diff: source/references/weex-variable.md --- @@ -160,3 +160,36 @@ weex.supports('module/*') // null weex.supports('@stream/fetch') // null weex.supports('getComponentRect') // null ``` + +## `weex.isRegisteredModule` + +Detect whether the specific module or method is registered. + +```js +weex.weex.isRegisteredModule(moduleName: string, methodName: string): boolean +``` + +It can only be used to check the compatibility of the specific module or method, not support components. --- End diff -- Let's change it to only what is supported - It can only be used to check compatibility of a specific module or method. ---
[GitHub] incubator-weex-site pull request #135: Update document of the weex variable ...
Github user Hanks10100 commented on a diff in the pull request: https://github.com/apache/incubator-weex-site/pull/135#discussion_r181969098 --- Diff: source/references/weex-variable.md --- @@ -160,3 +160,36 @@ weex.supports('module/*') // null weex.supports('@stream/fetch') // null weex.supports('getComponentRect') // null ``` + +## `weex.isRegisteredModule` + +Detect whether the specific module or method is registered. + +```js +weex.weex.isRegisteredModule(moduleName: string, methodName: string): boolean +``` + +It can only be used to check the compatibility of the specific module or method, not support components. --- End diff -- OK, I'll modify it. ---
[GitHub] incubator-weex-site pull request #135: Update document of the weex variable ...
Github user varunsob commented on a diff in the pull request: https://github.com/apache/incubator-weex-site/pull/135#discussion_r181968835 --- Diff: source/references/weex-variable.md --- @@ -160,3 +160,36 @@ weex.supports('module/*') // null weex.supports('@stream/fetch') // null weex.supports('getComponentRect') // null ``` + +## `weex.isRegisteredModule` + +Detect whether the specific module or method is registered. + +```js +weex.weex.isRegisteredModule(moduleName: string, methodName: string): boolean +``` + +It can only be used to check the compatibility of the specific module or method, not support components. --- End diff -- Suggestion: It can only be used to check compatibility of a specific module or method. Checking compatibility of components is not supported. ---
[GitHub] incubator-weex-site pull request #135: Update document of the weex variable ...
GitHub user Hanks10100 opened a pull request: https://github.com/apache/incubator-weex-site/pull/135 Update document of the weex variable api Add document for the `isRegisteredModule` and `isRegisteredComponent` api. You can merge this pull request into a Git repository by running: $ git pull https://github.com/Hanks10100/incubator-weex-site patch-4 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex-site/pull/135.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #135 commit 2ef7e599c9c4412865f9c79e2e0db5002b86be96 Author: HanksDate: 2018-04-17T06:52:07Z Update document of the weex variable api Add document for the `isRegisteredModule` and `isRegisteredComponent` api. ---