You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by Hanks Zhang <zh...@gmail.com> on 2017/03/10 06:26:32 UTC

Support all top-level DOM APIs in Vue 2

As we discussed before, we should support all top-level DOM operation APIs
directly to improve the performance. I have already achieved it in Weex
runtime, include the following methods:

Format: TAKS  -> METHOD

* createBody  -> callCreateBody
* addElement -> callAddElement
* removeElement -> callRemoveElement
* moveElement -> callMoveElement
* updateAttrs -> callUpdateAttrs
* updateStyle -> callUpdateStyle
* addEvent -> callAddEvent
* removeEvent -> callRemoveEvent

Our legacy js framework (known as .we) already support this feature. *However,
the Vue 2.0 should also support the corresponding feature as well.*

Re: Support all top-level DOM APIs in Vue 2

Posted by Wenhong Wu <ww...@gmail.com>.
En, so Vue2.0 change should be above SDK/jsfm? If API was called between JS
and native with high-frequency like "addElement", moving it to top-level
will save some time. I prefer other APIs be assessed in this way :)

Thanks

On Tue, Mar 14, 2017 at 1:16 PM, Hanks Zhang <zh...@gmail.com> wrote:

> Yes, we have already support "addElement" for a long time, but not include
> the other methods, such as "updateAttrs".
>
> By the way, we have refactored Weex runtime to use "TaskCenter" and
> "CallbackManager" to manage the render tasks. The Vue.js 2.0 should have a
> slight change to adapt it.
>
> 2017-03-13 15:41 GMT+08:00 wenhong.wwh <we...@alibaba-inc.com>:
>
> > I remember we already support “addElement” long time before as a
> top-level
> > API on both android/ios. So it would be easy to add others as well.
> > My question here is what else need to do to support Vue2.0. Won't Vue 2.0
> > use js framework? :)
> >
> > Thanks
> > Wenhong
> >
> >
> >
> >
>

Re: Support all top-level DOM APIs in Vue 2

Posted by Hanks Zhang <zh...@gmail.com>.
Yes, we have already support "addElement" for a long time, but not include
the other methods, such as "updateAttrs".

By the way, we have refactored Weex runtime to use "TaskCenter" and
"CallbackManager" to manage the render tasks. The Vue.js 2.0 should have a
slight change to adapt it.

2017-03-13 15:41 GMT+08:00 wenhong.wwh <we...@alibaba-inc.com>:

> I remember we already support “addElement” long time before as a top-level
> API on both android/ios. So it would be easy to add others as well.
> My question here is what else need to do to support Vue2.0. Won't Vue 2.0
> use js framework? :)
>
> Thanks
> Wenhong
>
>
>
>

Re: Support all top-level DOM APIs in Vue 2

Posted by "wenhong.wwh" <we...@alibaba-inc.com>.
I remember we already support “addElement” long time before as a top-level API on both android/ios. So it would be easy to add others as well.
My question here is what else need to do to support Vue2.0. Won't Vue 2.0 use js framework? :)

Thanks
Wenhong




Re: Support all top-level DOM APIs in Vue 2

Posted by 大诗胸 <so...@gmail.com>.
When I talking 'parse' mean the process converting js objects to string &
string to java objects, the whole serialization and un-serialization.
That's not a necessary part of js-native invoke process.

On Mon, Mar 13, 2017 at 2:38 PM, 申远 <sh...@gmail.com> wrote:

> There is no way you can skip parser. Parsing objects frrom c/c++ to java
> is also parsing. Reinventing the wheel (some home-made parser) is never
> good idea. Usually, you can not beat other state of art parser, like json
> or flatbuffer.
> > 在 2017年3月13日,10:19,大诗胸 <so...@gmail.com> 写道:
> >
> > Not me, this need some C++/C-guys to work this out. I don't speak C any
> > longer.🐆
> >
> > On Sun, Mar 12, 2017 at 7:10 PM, Adam Feng <cx...@gmail.com> wrote:
> >
> >> Seems to be amazing. @sospartan do you have any plan to do this? Or
> >> anyone volunteer?
> >>
> >> On 2017年3月11日 +0800 AM1:03, 大诗胸 <so...@gmail.com>, wrote:
> >>> The answer is yes. We can access java native object in ndk, and ndk can
> >>> access V8 javascript object. It's a lot of work to convert to each
> other.
> >>> After all, it's doable.
> >>>
> >>> On Fri, Mar 10, 2017 at 7:58 PM, Adam Feng <cx...@gmail.com> wrote:
> >>>
> >>>> Actually It’s possible for iOS, JavascriptCore has mechanism that
> >> support
> >>>> to export a “class” or an “object” to Javascript environment, but
> maybe
> >>>> it’s difficult for Android,is there any way to do that? I’d be wistful
> >> to
> >>>> see some programs working on that 😆
> >>>>
> >>>> On 2017年3月10日 +0800 PM7:47, 大诗胸 <so...@gmail.com>, wrote:
> >>>>> How about remove this whole 'JSON parsing' thing. As far as I seen,
> >> It's
> >>>>> doable.
> >>>>>
> >>>>> On Fri, Mar 10, 2017 at 5:35 PM, Adam Feng <cx...@gmail.com>
> >> wrote:
> >>>>>
> >>>>>> Maybe it’s a good idea, mixing up all the dom APIs into
> >> `callNative`
> >>>>>> always takes extra time to do JSON parsing.
> >>>>>>
> >>>>>> On 2017年3月10日 +0800 PM3:36, 大诗胸 <so...@gmail.com>, wrote:
> >>>>>>> Can you explain the reason why API change will cause performance
> >>>>>>> improvement?
> >>>>>>>
> >>>>>>> On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <
> >> zhanghan.me@gmail.com
> >>>>>> wrote:
> >>>>>>>
> >>>>>>>> As we discussed before, we should support all top-level DOM
> >>>> operation
> >>>>>> APIs
> >>>>>>>> directly to improve the performance. I have already achieved
> >> it in
> >>>> Weex
> >>>>>>>> runtime, include the following methods:
> >>>>>>>>
> >>>>>>>> Format: TAKS -> METHOD
> >>>>>>>>
> >>>>>>>> * createBody -> callCreateBody
> >>>>>>>> * addElement -> callAddElement
> >>>>>>>> * removeElement -> callRemoveElement
> >>>>>>>> * moveElement -> callMoveElement
> >>>>>>>> * updateAttrs -> callUpdateAttrs
> >>>>>>>> * updateStyle -> callUpdateStyle
> >>>>>>>> * addEvent -> callAddEvent
> >>>>>>>> * removeEvent -> callRemoveEvent
> >>>>>>>>
> >>>>>>>> Our legacy js framework (known as .we) already support this
> >>>> feature.
> >>>>>>>> *However,
> >>>>>>>> the Vue 2.0 should also support the corresponding feature as
> >> well.*
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> sospartan
> >>>>>>> Phone:13588488290
> >>>>>>> HangZhou
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> sospartan
> >>>>> Phone:13588488290
> >>>>> HangZhou
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> sospartan
> >>> Phone:13588488290
> >>> HangZhou
> >>
> >
> >
> >
> > --
> > sospartan
> > Phone:13588488290
> > HangZhou
>
>


-- 
sospartan
Phone:13588488290
HangZhou

Re: Support all top-level DOM APIs in Vue 2

Posted by 申远 <sh...@gmail.com>.
There is no way you can skip parser. Parsing objects frrom c/c++ to java is also parsing. Reinventing the wheel (some home-made parser) is never good idea. Usually, you can not beat other state of art parser, like json or flatbuffer.
> 在 2017年3月13日,10:19,大诗胸 <so...@gmail.com> 写道:
> 
> Not me, this need some C++/C-guys to work this out. I don't speak C any
> longer.🐆
> 
> On Sun, Mar 12, 2017 at 7:10 PM, Adam Feng <cx...@gmail.com> wrote:
> 
>> Seems to be amazing. @sospartan do you have any plan to do this? Or
>> anyone volunteer?
>> 
>> On 2017年3月11日 +0800 AM1:03, 大诗胸 <so...@gmail.com>, wrote:
>>> The answer is yes. We can access java native object in ndk, and ndk can
>>> access V8 javascript object. It's a lot of work to convert to each other.
>>> After all, it's doable.
>>> 
>>> On Fri, Mar 10, 2017 at 7:58 PM, Adam Feng <cx...@gmail.com> wrote:
>>> 
>>>> Actually It’s possible for iOS, JavascriptCore has mechanism that
>> support
>>>> to export a “class” or an “object” to Javascript environment, but maybe
>>>> it’s difficult for Android,is there any way to do that? I’d be wistful
>> to
>>>> see some programs working on that 😆
>>>> 
>>>> On 2017年3月10日 +0800 PM7:47, 大诗胸 <so...@gmail.com>, wrote:
>>>>> How about remove this whole 'JSON parsing' thing. As far as I seen,
>> It's
>>>>> doable.
>>>>> 
>>>>> On Fri, Mar 10, 2017 at 5:35 PM, Adam Feng <cx...@gmail.com>
>> wrote:
>>>>> 
>>>>>> Maybe it’s a good idea, mixing up all the dom APIs into
>> `callNative`
>>>>>> always takes extra time to do JSON parsing.
>>>>>> 
>>>>>> On 2017年3月10日 +0800 PM3:36, 大诗胸 <so...@gmail.com>, wrote:
>>>>>>> Can you explain the reason why API change will cause performance
>>>>>>> improvement?
>>>>>>> 
>>>>>>> On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <
>> zhanghan.me@gmail.com
>>>>>> wrote:
>>>>>>> 
>>>>>>>> As we discussed before, we should support all top-level DOM
>>>> operation
>>>>>> APIs
>>>>>>>> directly to improve the performance. I have already achieved
>> it in
>>>> Weex
>>>>>>>> runtime, include the following methods:
>>>>>>>> 
>>>>>>>> Format: TAKS -> METHOD
>>>>>>>> 
>>>>>>>> * createBody -> callCreateBody
>>>>>>>> * addElement -> callAddElement
>>>>>>>> * removeElement -> callRemoveElement
>>>>>>>> * moveElement -> callMoveElement
>>>>>>>> * updateAttrs -> callUpdateAttrs
>>>>>>>> * updateStyle -> callUpdateStyle
>>>>>>>> * addEvent -> callAddEvent
>>>>>>>> * removeEvent -> callRemoveEvent
>>>>>>>> 
>>>>>>>> Our legacy js framework (known as .we) already support this
>>>> feature.
>>>>>>>> *However,
>>>>>>>> the Vue 2.0 should also support the corresponding feature as
>> well.*
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> sospartan
>>>>>>> Phone:13588488290
>>>>>>> HangZhou
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> sospartan
>>>>> Phone:13588488290
>>>>> HangZhou
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> sospartan
>>> Phone:13588488290
>>> HangZhou
>> 
> 
> 
> 
> -- 
> sospartan
> Phone:13588488290
> HangZhou


Re: Support all top-level DOM APIs in Vue 2

Posted by 大诗胸 <so...@gmail.com>.
Not me, this need some C++/C-guys to work this out. I don't speak C any
longer.🐆

On Sun, Mar 12, 2017 at 7:10 PM, Adam Feng <cx...@gmail.com> wrote:

> Seems to be amazing. @sospartan do you have any plan to do this? Or
> anyone volunteer?
>
> On 2017年3月11日 +0800 AM1:03, 大诗胸 <so...@gmail.com>, wrote:
> > The answer is yes. We can access java native object in ndk, and ndk can
> > access V8 javascript object. It's a lot of work to convert to each other.
> > After all, it's doable.
> >
> > On Fri, Mar 10, 2017 at 7:58 PM, Adam Feng <cx...@gmail.com> wrote:
> >
> > > Actually It’s possible for iOS, JavascriptCore has mechanism that
> support
> > > to export a “class” or an “object” to Javascript environment, but maybe
> > > it’s difficult for Android,is there any way to do that? I’d be wistful
> to
> > > see some programs working on that 😆
> > >
> > > On 2017年3月10日 +0800 PM7:47, 大诗胸 <so...@gmail.com>, wrote:
> > > > How about remove this whole 'JSON parsing' thing. As far as I seen,
> It's
> > > > doable.
> > > >
> > > > On Fri, Mar 10, 2017 at 5:35 PM, Adam Feng <cx...@gmail.com>
> wrote:
> > > >
> > > > > Maybe it’s a good idea, mixing up all the dom APIs into
> `callNative`
> > > > > always takes extra time to do JSON parsing.
> > > > >
> > > > > On 2017年3月10日 +0800 PM3:36, 大诗胸 <so...@gmail.com>, wrote:
> > > > > > Can you explain the reason why API change will cause performance
> > > > > > improvement?
> > > > > >
> > > > > > On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <
> zhanghan.me@gmail.com
> > > > > wrote:
> > > > > >
> > > > > > > As we discussed before, we should support all top-level DOM
> > > operation
> > > > > APIs
> > > > > > > directly to improve the performance. I have already achieved
> it in
> > > Weex
> > > > > > > runtime, include the following methods:
> > > > > > >
> > > > > > > Format: TAKS -> METHOD
> > > > > > >
> > > > > > > * createBody -> callCreateBody
> > > > > > > * addElement -> callAddElement
> > > > > > > * removeElement -> callRemoveElement
> > > > > > > * moveElement -> callMoveElement
> > > > > > > * updateAttrs -> callUpdateAttrs
> > > > > > > * updateStyle -> callUpdateStyle
> > > > > > > * addEvent -> callAddEvent
> > > > > > > * removeEvent -> callRemoveEvent
> > > > > > >
> > > > > > > Our legacy js framework (known as .we) already support this
> > > feature.
> > > > > > > *However,
> > > > > > > the Vue 2.0 should also support the corresponding feature as
> well.*
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > sospartan
> > > > > > Phone:13588488290
> > > > > > HangZhou
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > sospartan
> > > > Phone:13588488290
> > > > HangZhou
> > >
> >
> >
> >
> > --
> > sospartan
> > Phone:13588488290
> > HangZhou
>



-- 
sospartan
Phone:13588488290
HangZhou

Re: Support all top-level DOM APIs in Vue 2

Posted by Adam Feng <cx...@gmail.com>.
Seems to be amazing. @sospartan do you have any plan to do this? Or anyone volunteer?

On 2017年3月11日 +0800 AM1:03, 大诗胸 <so...@gmail.com>, wrote:
> The answer is yes. We can access java native object in ndk, and ndk can
> access V8 javascript object. It's a lot of work to convert to each other.
> After all, it's doable.
>
> On Fri, Mar 10, 2017 at 7:58 PM, Adam Feng <cx...@gmail.com> wrote:
>
> > Actually It’s possible for iOS, JavascriptCore has mechanism that support
> > to export a “class” or an “object” to Javascript environment, but maybe
> > it’s difficult for Android,is there any way to do that? I’d be wistful to
> > see some programs working on that 😆
> >
> > On 2017年3月10日 +0800 PM7:47, 大诗胸 <so...@gmail.com>, wrote:
> > > How about remove this whole 'JSON parsing' thing. As far as I seen, It's
> > > doable.
> > >
> > > On Fri, Mar 10, 2017 at 5:35 PM, Adam Feng <cx...@gmail.com> wrote:
> > >
> > > > Maybe it’s a good idea, mixing up all the dom APIs into `callNative`
> > > > always takes extra time to do JSON parsing.
> > > >
> > > > On 2017年3月10日 +0800 PM3:36, 大诗胸 <so...@gmail.com>, wrote:
> > > > > Can you explain the reason why API change will cause performance
> > > > > improvement?
> > > > >
> > > > > On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <zhanghan.me@gmail.com
> > > > wrote:
> > > > >
> > > > > > As we discussed before, we should support all top-level DOM
> > operation
> > > > APIs
> > > > > > directly to improve the performance. I have already achieved it in
> > Weex
> > > > > > runtime, include the following methods:
> > > > > >
> > > > > > Format: TAKS -> METHOD
> > > > > >
> > > > > > * createBody -> callCreateBody
> > > > > > * addElement -> callAddElement
> > > > > > * removeElement -> callRemoveElement
> > > > > > * moveElement -> callMoveElement
> > > > > > * updateAttrs -> callUpdateAttrs
> > > > > > * updateStyle -> callUpdateStyle
> > > > > > * addEvent -> callAddEvent
> > > > > > * removeEvent -> callRemoveEvent
> > > > > >
> > > > > > Our legacy js framework (known as .we) already support this
> > feature.
> > > > > > *However,
> > > > > > the Vue 2.0 should also support the corresponding feature as well.*
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > sospartan
> > > > > Phone:13588488290
> > > > > HangZhou
> > > >
> > >
> > >
> > >
> > > --
> > > sospartan
> > > Phone:13588488290
> > > HangZhou
> >
>
>
>
> --
> sospartan
> Phone:13588488290
> HangZhou

Re: Support all top-level DOM APIs in Vue 2

Posted by 大诗胸 <so...@gmail.com>.
The answer is yes. We can access java native object in ndk,  and ndk can
access V8 javascript object. It's a lot of work to convert to each other.
After all, it's doable.

On Fri, Mar 10, 2017 at 7:58 PM, Adam Feng <cx...@gmail.com> wrote:

> Actually It’s possible for iOS, JavascriptCore has mechanism that support
> to export a “class” or an “object” to Javascript environment,  but maybe
> it’s difficult for Android,is there any way to do that? I’d be wistful to
> see some programs working on that 😆
>
> On 2017年3月10日 +0800 PM7:47, 大诗胸 <so...@gmail.com>, wrote:
> > How about remove this whole 'JSON parsing' thing. As far as I seen, It's
> > doable.
> >
> > On Fri, Mar 10, 2017 at 5:35 PM, Adam Feng <cx...@gmail.com> wrote:
> >
> > > Maybe it’s a good idea, mixing up all the dom APIs into `callNative`
> > > always takes extra time to do JSON parsing.
> > >
> > > On 2017年3月10日 +0800 PM3:36, 大诗胸 <so...@gmail.com>, wrote:
> > > > Can you explain the reason why API change will cause performance
> > > > improvement?
> > > >
> > > > On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <zhanghan.me@gmail.com
> > > wrote:
> > > >
> > > > > As we discussed before, we should support all top-level DOM
> operation
> > > APIs
> > > > > directly to improve the performance. I have already achieved it in
> Weex
> > > > > runtime, include the following methods:
> > > > >
> > > > > Format: TAKS -> METHOD
> > > > >
> > > > > * createBody -> callCreateBody
> > > > > * addElement -> callAddElement
> > > > > * removeElement -> callRemoveElement
> > > > > * moveElement -> callMoveElement
> > > > > * updateAttrs -> callUpdateAttrs
> > > > > * updateStyle -> callUpdateStyle
> > > > > * addEvent -> callAddEvent
> > > > > * removeEvent -> callRemoveEvent
> > > > >
> > > > > Our legacy js framework (known as .we) already support this
> feature.
> > > > > *However,
> > > > > the Vue 2.0 should also support the corresponding feature as well.*
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > sospartan
> > > > Phone:13588488290
> > > > HangZhou
> > >
> >
> >
> >
> > --
> > sospartan
> > Phone:13588488290
> > HangZhou
>



-- 
sospartan
Phone:13588488290
HangZhou

Re: Support all top-level DOM APIs in Vue 2

Posted by Adam Feng <cx...@gmail.com>.
Actually It’s possible for iOS, JavascriptCore has mechanism that support to export a “class” or an “object” to Javascript environment,  but maybe it’s difficult for Android,is there any way to do that? I’d be wistful to see some programs working on that 😆

On 2017年3月10日 +0800 PM7:47, 大诗胸 <so...@gmail.com>, wrote:
> How about remove this whole 'JSON parsing' thing. As far as I seen, It's
> doable.
>
> On Fri, Mar 10, 2017 at 5:35 PM, Adam Feng <cx...@gmail.com> wrote:
>
> > Maybe it’s a good idea, mixing up all the dom APIs into `callNative`
> > always takes extra time to do JSON parsing.
> >
> > On 2017年3月10日 +0800 PM3:36, 大诗胸 <so...@gmail.com>, wrote:
> > > Can you explain the reason why API change will cause performance
> > > improvement?
> > >
> > > On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <zhanghan.me@gmail.com
> > wrote:
> > >
> > > > As we discussed before, we should support all top-level DOM operation
> > APIs
> > > > directly to improve the performance. I have already achieved it in Weex
> > > > runtime, include the following methods:
> > > >
> > > > Format: TAKS -> METHOD
> > > >
> > > > * createBody -> callCreateBody
> > > > * addElement -> callAddElement
> > > > * removeElement -> callRemoveElement
> > > > * moveElement -> callMoveElement
> > > > * updateAttrs -> callUpdateAttrs
> > > > * updateStyle -> callUpdateStyle
> > > > * addEvent -> callAddEvent
> > > > * removeEvent -> callRemoveEvent
> > > >
> > > > Our legacy js framework (known as .we) already support this feature.
> > > > *However,
> > > > the Vue 2.0 should also support the corresponding feature as well.*
> > > >
> > >
> > >
> > >
> > > --
> > > sospartan
> > > Phone:13588488290
> > > HangZhou
> >
>
>
>
> --
> sospartan
> Phone:13588488290
> HangZhou

Re: Support all top-level DOM APIs in Vue 2

Posted by 大诗胸 <so...@gmail.com>.
How about remove this whole 'JSON parsing' thing. As far as I seen, It's
doable.

On Fri, Mar 10, 2017 at 5:35 PM, Adam Feng <cx...@gmail.com> wrote:

> Maybe it’s a good idea,  mixing up all the dom APIs into `callNative`
> always takes extra time to do JSON parsing.
>
> On 2017年3月10日 +0800 PM3:36, 大诗胸 <so...@gmail.com>, wrote:
> > Can you explain the reason why API change will cause performance
> > improvement?
> >
> > On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <zh...@gmail.com>
> wrote:
> >
> > > As we discussed before, we should support all top-level DOM operation
> APIs
> > > directly to improve the performance. I have already achieved it in Weex
> > > runtime, include the following methods:
> > >
> > > Format: TAKS -> METHOD
> > >
> > > * createBody -> callCreateBody
> > > * addElement -> callAddElement
> > > * removeElement -> callRemoveElement
> > > * moveElement -> callMoveElement
> > > * updateAttrs -> callUpdateAttrs
> > > * updateStyle -> callUpdateStyle
> > > * addEvent -> callAddEvent
> > > * removeEvent -> callRemoveEvent
> > >
> > > Our legacy js framework (known as .we) already support this feature.
> > > *However,
> > > the Vue 2.0 should also support the corresponding feature as well.*
> > >
> >
> >
> >
> > --
> > sospartan
> > Phone:13588488290
> > HangZhou
>



-- 
sospartan
Phone:13588488290
HangZhou

Re: Support all top-level DOM APIs in Vue 2

Posted by Adam Feng <cx...@gmail.com>.
Maybe it’s a good idea,  mixing up all the dom APIs into `callNative` always takes extra time to do JSON parsing.

On 2017年3月10日 +0800 PM3:36, 大诗胸 <so...@gmail.com>, wrote:
> Can you explain the reason why API change will cause performance
> improvement?
>
> On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <zh...@gmail.com> wrote:
>
> > As we discussed before, we should support all top-level DOM operation APIs
> > directly to improve the performance. I have already achieved it in Weex
> > runtime, include the following methods:
> >
> > Format: TAKS -> METHOD
> >
> > * createBody -> callCreateBody
> > * addElement -> callAddElement
> > * removeElement -> callRemoveElement
> > * moveElement -> callMoveElement
> > * updateAttrs -> callUpdateAttrs
> > * updateStyle -> callUpdateStyle
> > * addEvent -> callAddEvent
> > * removeEvent -> callRemoveEvent
> >
> > Our legacy js framework (known as .we) already support this feature.
> > *However,
> > the Vue 2.0 should also support the corresponding feature as well.*
> >
>
>
>
> --
> sospartan
> Phone:13588488290
> HangZhou

Re: Support all top-level DOM APIs in Vue 2

Posted by 大诗胸 <so...@gmail.com>.
Can you explain the reason why API change will cause performance
improvement?

On Fri, Mar 10, 2017 at 2:26 PM, Hanks Zhang <zh...@gmail.com> wrote:

> As we discussed before, we should support all top-level DOM operation APIs
> directly to improve the performance. I have already achieved it in Weex
> runtime, include the following methods:
>
> Format: TAKS  -> METHOD
>
> * createBody  -> callCreateBody
> * addElement -> callAddElement
> * removeElement -> callRemoveElement
> * moveElement -> callMoveElement
> * updateAttrs -> callUpdateAttrs
> * updateStyle -> callUpdateStyle
> * addEvent -> callAddEvent
> * removeEvent -> callRemoveEvent
>
> Our legacy js framework (known as .we) already support this feature.
> *However,
> the Vue 2.0 should also support the corresponding feature as well.*
>



-- 
sospartan
Phone:13588488290
HangZhou