Hello! I have been experimenting with using Kotlin...
# javascript
k
Hello! I have been experimenting with using Kotlin for Firefox WebExtensions and I think I found a bug in Koltin/JS. In Firefox WebExtensions content scripts run in a separate global, which means in particular that
Object !== window.Object
(see https://bugzilla.mozilla.org/show_bug.cgi?id=1523139). Kotlin does not seem to respect this fact, which, among other things, results in
document is Any == false
(because
document instanceof window.Object === true
and
document instanceof Object === false
). This obviously leads to many further errors. Is this considered a bug or is it intended behaviour and is there a workaround for this problem?