on

fun on(retrieveJs: String? = null, preventDefault: Boolean = false): OnReceiver<Window>

You can supply a javascript expression retrieveJs which will be available via Event.retrieved

val on: OnReceiver<Window>

See here.