docs-v7
docs-v7 copied to clipboard
Wrong example for addWeakEventListener
Please, tell us what's the problem?
Wrong documentation
Please, tell us more details
Hi! I found a super weird example in the docs https://docs.nativescript.org/core-concepts/events#working-with-weak-events-Adding
thisuses in global scope (it'sundefined)addWeakEventListenerhas a totally different definition:addWeakEventListener(source: Observable, eventName: string, handler: (eventData: EventData) => void, target: any): void;- no
WeakRefimport - there are no
WeakEventListenerandWeakEventListenerOptionsexports in thetns-core-modules/ui/core/weak-event-listener-module - and other mistakes...
Thanks for point this out @smelukov. We will take a look at the issue. Meanwhile, if you have a suggestion how to make this example work - you are most welcome to open a pull request in this repository.