NathanaelA / nativescript-dom

NativeScript DOM emulation methods
MIT License
42 stars 23 forks source link

NativeScript 3 compatibility #9

Closed ludwiktrammer closed 7 years ago

ludwiktrammer commented 7 years ago

There are two main changes:

  1. Stoped using the cssClass property (which is a long deprecated, and now removed name for className). Use className instead.

  2. Operate on ViewBase objects instead of operating on View objects. This is consistent with how the built-in getViewById method behaves in NS 3 (i.e. it also is defined in ViewBase class and also returns ViewBase objects). It is also pretty much unavoidable, since the eachDescendant method, used internally by nativescript-dom, now operates on ViewBase objects - and some of them will actually not be View objects (for example Span or ActionBar).

After making those changes I tested every method exposed by nativescript-dom and they all seemed to work fine. In the process of testing, I discovered two additional issues that were not specific to NativeScript 3. I corrected them and will indicate them using code comments.

NathanaelA commented 7 years ago

Very nice. I had expected to see more changes. Thanks, I'll get this posted as a RC shortly. Going to fix the copy/paste error for view.runAgainstId and publish a final v2.5 plugin.

NathanaelA commented 7 years ago

Thank you. I have published v2.00 which is NS 3.0 compatible.

jlooper commented 7 years ago

@ludwiktrammer I'd be pleased to send you a little token of our appreciation for this PR if you ping me on NativeScript Community Slack to arrange shipping. :)