https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
javascript
  • t

    Torbilicious

    05/31/2018, 12:07 PM
    Hi! I am new to kotlin/js, so please excuse if this is already answered, but i couldn't find it anywhere. Is there any possiblity to debug kotlin/js in intellij? IJ automatically generates a node js run configuration for you, but i could not find any way to make it use the kotlin.js file also. The official documentation(https://www.jetbrains.com/help/idea/run-debug-configuration-kotlin-javascript.html) states that there is a Kotlin-JavaScript Run Configuration, but i could find it neither in 2018.1 nor in 2018.2 EAP.
    e
    v
    • 3
    • 8
  • t

    Talon

    05/31/2018, 6:34 PM
    how are people bundling CSS with their projects?
    a
    • 2
    • 1
  • k

    krtko

    06/02/2018, 5:40 PM
    Hey I moved to Kotlin 1.2.50-eap-62 and it no longer generates a Kotlin.js library. I can't find docs on compileKotlin2Js, does anyone know where they are?
    n
    a
    • 3
    • 5
  • p

    Prashoor Chitnis

    06/04/2018, 11:10 AM
    Any body had a hands on over how to step by step setup a react native app using kotlin?
    r
    • 2
    • 2
  • h

    hackerham

    06/04/2018, 12:19 PM
    Stupid question. How to make external class extend non-external?
    external class MyError extends Error { ... }
    r
    n
    • 3
    • 4
  • h

    hackerham

    06/05/2018, 1:18 PM
    im trying to make a multi-platform app through two projects that share some of source directories. I cant just put everything in
    mylib.shim.*
    because imports might be optimized by IDE, and that'll affect JVM platform too
    a
    • 2
    • 5
  • h

    hackerham

    06/05/2018, 2:19 PM
    ok, so, i took Kotlin master branch, and i want to build
    libraries/stdlib/js
    . trying to do it with 1.2.40 and gradle 4.3.1 , failing
    i
    • 2
    • 1
  • h

    hackerham

    06/05/2018, 2:19 PM
    can someone walk me through this thing?
    r
    a
    i
    • 4
    • 17
  • k

    krtko

    06/07/2018, 6:21 PM
    Hey when I map a Kotlin object to some JS via External, etc and the JS is loaded via async. I get
    Uncaught ReferenceError: google is not defined
    . Is there a way to remove kotlin's safety check for external JS?
    r
    • 2
    • 8
  • z

    Zaid

    06/10/2018, 12:26 PM
    I have two lines in my kotlin JS project.
    println("hello")
    print("world")
    but it only prints
    hello
    in the chrome console. I am confused why it shows such a behaviour , Is there any specific reason for that ?
    a
    • 2
    • 3
  • n

    Nail Gilaziev

    06/11/2018, 7:19 PM
    Can I use kotlinJs react with polymer components? If yes - is there a starting poing to learn about it?
    s
    • 2
    • 1
  • n

    Nail Gilaziev

    06/12/2018, 11:40 AM
    why are there so few articles on the internet about using the kotlin/js? I have experience in android/ios and backend, but not in the frontend. And It’s hard to start. This talk is great, but the lack of articles alarming me

    https://www.youtube.com/watch?v=FDOECr-sT6U▾

    ➕ 3
    h
    g
    +3
    • 6
    • 12
  • c

    coder82

    06/14/2018, 9:05 PM
    i am running with version kotlinx-coroutines-core-js 0.23.2
    b
    • 2
    • 2
  • r

    robstoll

    06/18/2018, 1:03 PM
    today I came across. "captureStack" when analysing a thrown exception. If found this: https://github.com/JetBrains/kotlin/blob/master/js/js.translator/src/org/jetbrains/kotlin/js/translate/initializer/ClassInitializerTranslator.java#L398 but I do not know what it is about or rather why I saw this instead of the proper error. Does someone of you know when captureStack is shown instead of the regular exception?
    b
    • 2
    • 23
  • y

    ylemoigne

    06/19/2018, 9:51 PM
    Is there any "pure-kotlin" front-end lib/framework ? (I begin to find using kotlin-react (and react-ecosystem lib like redux) a bit cumbersome and think it might be a solution.)
    👍 2
    b
    c
    b
    • 4
    • 5
  • s

    spierce7

    06/21/2018, 12:07 AM
    does the kotlin-js platform support sourcesets? If I had multiple source sets for a kotlin-js module, how would I select which ones are compiled?
    b
    • 2
    • 1
  • w

    wilyarti

    06/21/2018, 9:38 PM
    I am trying to use the create-react-kotlin-app. I want to send data between the app and the server. Kotlin x-serialization is not supported. Is there a more Kotlin-ish way to send data between the Kotlin JS code and the Kotlin JVM code?
    g
    n
    s
    • 4
    • 16
  • c

    coder82

    06/21/2018, 10:46 PM
    thing is, when we update is a bit like walking in the dark... things break and we don't know what to do...
    r
    • 2
    • 1
  • v

    Vivek

    06/22/2018, 6:04 PM
    Hello, what do folks here use for unit testing with KotlinJS?
    l
    r
    b
    • 4
    • 4
  • l

    louiscad

    06/23/2018, 10:14 AM
    Hi, does anyone know a Kotlin/JS project that uses Kotlin Gradle Script ? I'd like to see examples to build a multiplatform website (using jvm to generate static files, and js for the rest) project
    b
    • 2
    • 2
  • g

    gcx11

    06/23/2018, 2:24 PM
    Hello, is there more idiomatic way with coroutines for something like this?
    launch {
                while (true) {
                    context.clearRect(
                        0.0,
                        0.0,
                        context.canvas.width.toDouble(),
                        context.canvas.height.toDouble()
                    )
                    draw(context)
                    delay(1000 / 60)
                }
            }
    n
    u
    b
    • 4
    • 9
  • w

    wilyarti

    06/24/2018, 10:41 AM
    I know Kotlin-JS is fairly new. Does anyone have an example of Kotlin-Javascript inter-op? I want to use a library like canvasjs or chartjs.
    b
    • 2
    • 1
  • l

    lewik

    06/28/2018, 3:33 PM
    How to make one js module depend on other js module? Should I use kotlin-frontend-plugin ? I am getting
    Kotlin.defineModule is not a function
    . Both is commonjs
    a
    j
    • 3
    • 10
  • c

    coder82

    06/30/2018, 10:08 AM
    this in kotlinjs
    g
    • 2
    • 1
  • c

    coder82

    06/30/2018, 2:25 PM
    is the the "Channel" class in kotlin-js ?
    g
    • 2
    • 2
  • v

    Vivek

    07/01/2018, 4:17 PM
    Does anyone know how I can mock functions when writing unit tests?
    g
    • 2
    • 5
  • j

    jw

    07/02/2018, 4:01 AM
    are the snapshots published somewhere? I can see the binaries on TeamCity that I can manually download, but I want to point my builds at a maven repo.
    r
    • 2
    • 6
  • c

    coder82

    07/02/2018, 11:51 AM
    is there a way to make it pass something in there?
    r
    • 2
    • 4
  • g

    gregopet

    07/03/2018, 10:36 AM
    Is there any particular reason why the JS
    Date
    type mapping does not contain time component setter functions?
    r
    • 2
    • 2
  • j

    Jared

    07/07/2018, 7:08 PM
    Does anyone know how I would do this? So a d3.js selection, which is basically an array of dom elements with extra functions, has the function .each() which can take a lambda function. Within the lambda function 'this' takes on the value of the current element in the iteration. How would I write an external kotlin function so that I can reference a given element that is normally 'this' inside the lambda?
Powered by Linen
Title
j

Jared

07/07/2018, 7:08 PM
Does anyone know how I would do this? So a d3.js selection, which is basically an array of dom elements with extra functions, has the function .each() which can take a lambda function. Within the lambda function 'this' takes on the value of the current element in the iteration. How would I write an external kotlin function so that I can reference a given element that is normally 'this' inside the lambda?
View count: 3