Ok, I have a kotlin to javascript conversion quest...
# javascript
j
Ok, I have a kotlin to javascript conversion question. Lets say I am using an external javascript library which rebinds 'this' on a callback that you pass in. How do I construct a lambda in kotlin that can simulate this behavior?
b
Unfortunately, there no (good) type-safe way to achieve it yet. The related issue: https://youtrack.jetbrains.com/issue/KT-15140
The possible workaround is using
js("this")
for accessing to context object