mp
09/05/2019, 3:01 PMjosephivie
09/05/2019, 5:31 PMnative
to external
- I just mis-remembered)
I believe you can use external
declarations to accomplish what you are looking for. Example of an external declaration:
external fun Window.atob(value: String): String
The above would give you access to this:
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/atob
External declarations are more or less a statement of, "at runtime, this function/field will be available and will be structured like this."mp
09/05/2019, 5:53 PMexternal
keyword
/**
* <https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onInstalled>
*/
external interface OnInstalled {
fun hasListeners(): Boolean
fun hasListener(listener: EventListener): Boolean
/**
* @param details
*/
fun addListener(listener: (Details) -> Unit)
fun removeListener(details: Details)
}
but didn’t understand how to get propertiesjosephivie
09/05/2019, 5:57 PMjosephivie
09/05/2019, 5:58 PMexternal val Something.nameOfField: Type