[ 
https://issues.apache.org/jira/browse/WEEX-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16196661#comment-16196661
 ] 

ASF GitHub Bot commented on WEEX-78:
------------------------------------

GitHub user Hanks10100 opened a pull request:

    https://github.com/apache/incubator-weex/pull/770

    [WEEX-78] Replace "includes" with "indexOf" to improve compatibility

    ### Problem
    
    `Array.prototype.includes` is defined in ECMAScript 2016 (ES7) which is not 
compatible with low version js engines.
    
    ### Solution
    
    Use `Array.prototype.indexOf` instead of `Array.prototype.includes`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Hanks10100/incubator-weex jsfm-bugfix-includes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/770.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 #770
    
----
commit bdd651bb45c137e8f6bcf860029a399c79cffbf7
Author: Hanks <[email protected]>
Date:   2017-10-09T08:34:26Z

    * [jsfm] use "indexOf" instead of "includes" in Element.fireEvent

----


> The ES7 methods should be removed to improve compatibility
> ----------------------------------------------------------
>
>                 Key: WEEX-78
>                 URL: https://issues.apache.org/jira/browse/WEEX-78
>             Project: Weex
>          Issue Type: Bug
>          Components: JSFM
>            Reporter: Hanks Zhang
>            Assignee: sospartan
>              Labels: patch
>
> The implementation of event bubbling in JSF is using 
> `Array.prototype.includes` API [1] which is defined in ECMAScript 2016 (ES7). 
> This method is not compatible with low version js engines and should be 
> replaced.
> [1] 
> https://github.com/apache/incubator-weex/blob/4bc653653c1460dcad0642ef654e593c89ebaaf1/html5/runtime/vdom/Element.js#L412



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

Reply via email to