Missing parts of browser API

Hi all,

I would like to ask kotlin team about their plans to extend kotlin wrappers for JS/Browser APIs.
It is really pleasant to use Kotlin instead of JS, but we are often hitting into missing APIs, which means a lot of asDynamic()s, extensions… Thanx for comments;).

Could you explain what specific functionality are you missing? Otherwise, your post is not quite useful.

For example -

Console API - missing most of methods. (https://youtrack.jetbrains.com/issue/KT-33595)
Touch events (https://youtrack.jetbrains.com/issue/KT-21445)
Geolocation API (https://youtrack.jetbrains.com/issue/KT-25710)
Date is missing setters
Some onXXX properties, ie. onload is supported, onunload is not

I can not provide any specific date however what I can definitely say that we acknowledge the problem and working on a big update of browser environment external declarations. Technically we tend not to write such declarations by ourselves rather than reusing idl declarations from browser vendors so the solution will involve some improvements on the generation side. Will keep you posted!

4 Likes

kotlin reflection in JS ?
I would really like this.
I’d be happy to contribute, if someone gives me a pointer on where to start?
is anyone else working on the kotlin JS reflection?

Just FYI: there is a TypeScript declarations for browser apis: https://github.com/microsoft/TypeScript/blob/master/lib/lib.dom.d.ts

You can use it for auto-generation