You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "Adam Feng (JIRA)" <ji...@apache.org> on 2017/10/11 13:28:00 UTC

[jira] [Assigned] (WEEX-54) [proposal] Support to detect the feature compatibility of weex

     [ https://issues.apache.org/jira/browse/WEEX-54?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Feng reassigned WEEX-54:
-----------------------------

    Assignee: Hanks Zhang  (was: sospartan)

> [proposal] Support to detect the feature compatibility of weex
> --------------------------------------------------------------
>
>                 Key: WEEX-54
>                 URL: https://issues.apache.org/jira/browse/WEEX-54
>             Project: Weex
>          Issue Type: New Feature
>          Components: JSFM
>    Affects Versions: 0.15
>            Reporter: Hanks Zhang
>            Assignee: Hanks Zhang
>            Priority: Minor
>              Labels: features
>
> h2. Background
> Because Weex support to extend components and modules, so the host environment will be very different. Weex needs a mechanism to detect whether a feature is supported in the current environment.
> h2. API Design
> {code:javascript}
> weex.supports(condition : String) : Boolean | Null
> {code}
> * param: a formatted string. @TYPE/NAME
> * return value: supported -> true | unsupported -> false | unclear -> null
> h2. Usage
> {code:javascript}
> // Detects whether the embed component is supported
> weex.supports('@component/embed')
> // Detects whether the picker module is supported
> weex.supports('@module/picker')
> // Detects whether the dom.getComponentRect method is supported
> weex.supports('@module/dom.getComponentRect')
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)