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
  • a

    Aregev2

    05/01/2018, 8:33 AM
    Can k/js be used to build UWP apps, I know that js can be used alone, would be nice to see this feture
    b
    • 2
    • 3
  • r

    robstoll

    05/01/2018, 8:35 AM
    How do you iterate over a NodeList (e.g. returned by
    querySelectorAll
    ). IntelliJ has
    iterator
    in code completion but the compiler does not know if if I use it. it suggests to import kotlin.js.iterator but that does not help either
    g
    • 2
    • 1
  • f

    Francis

    05/01/2018, 3:16 PM
    hi, is it possible to load any react component (from jsx) into kotlin react, or every component need a bridge?
    b
    • 2
    • 2
  • t

    Talon

    05/01/2018, 6:45 PM
    I'm interested to know how people are bundling their CSS with the Kotlin Frontend Plugin for gradle
    b
    • 2
    • 1
  • s

    spierce7

    05/02/2018, 2:41 PM
    @bashor for this issue ( https://youtrack.jetbrains.com/issue/KT-16604#comment=27-2850254 ), you mention compiler plugins. Are there any examples of any that you can link me to?
    g
    b
    • 3
    • 4
  • a

    arocnies

    05/05/2018, 1:46 AM
    Is there a kotlin/js stdlib CDN?
    b
    • 2
    • 2
  • n

    nish

    05/05/2018, 5:53 PM
    mocha + assertk
    r
    • 2
    • 1
  • e

    Eduardo Santos

    05/06/2018, 8:24 PM
    I'm new with kotlin-js. Is there some way to build one js file for each kotlin file? I only find a way the generates only one file with all js "files" included.
    a
    • 2
    • 1
  • l

    lewik

    05/07/2018, 8:29 PM
    Kotlin frontend plugin: How to speedup compileKotlin2Js ?
    b
    n
    • 3
    • 4
  • b

    bashor

    05/07/2018, 8:42 PM
    📣📣📣 Hi, All! Could you please participate in the small poll? Do you use gradle Incremental Compilation for Kotlin/JS? :yes: 🇳🇴 🐛 — doesn’t work to me ❓— I don’t know about such possibility
    🐛 2
    :yes: 3
    ❓ 21
    🇳🇴 4
    l
    d
    j
    • 4
    • 24
  • g

    gaetan

    05/07/2018, 11:13 PM
    How can you use external definitions of google maps API with a module loaded directly from a script tag in the html page?
    b
    • 2
    • 3
  • w

    wickedev

    05/08/2018, 3:05 AM
    How can I test async code(like promise) in kotlin.js?
    ✅ 1
    a
    g
    • 3
    • 2
  • s

    samir

    05/09/2018, 2:20 PM
    How can I build target ref in kotlin-styles?
    .dropdown:hover .dropdown-content {
        display: block;
    }
    a
    l
    • 3
    • 4
  • y

    ylemoigne

    05/10/2018, 3:22 AM
    OK, excuse me, visibly it's not a kotlin issue, but a js one.
    a
    d
    • 3
    • 19
  • t

    Talon

    05/10/2018, 4:36 PM
    is it possible to easily patch this until it is fixed in the kotlinx.html lib?
    a
    • 2
    • 1
  • y

    ylemoigne

    05/11/2018, 3:07 PM
    I want to convert a plain object (from json) to an instance of a class. For this I've defined
    external object Object {
        fun setPrototypeOf(plain: dynamic, prototype: dynamic): dynamic
    }
    and call it with
    Object.plain(myPlainObject, kotlinext.js.Object.getPrototypeOf(type!!.js.asDynamic().prototype))
    but it doesn't seem to work.
    s
    • 2
    • 3
  • m

    marcinmoskala

    05/13/2018, 9:21 PM
    https://stackoverflow.com/questions/50320745/cant-resolve-kotlin-in-home-marcin-projects-edukotlinacademy-web-build-node
    ✅ 1
    r
    • 2
    • 1
  • m

    Marcel Overdijk

    05/14/2018, 11:01 AM
    E.g. I'm already stuck in defining the following in Kotlin:
    const root = {
        message: () => 'Hello World!!'
    };
    g
    • 2
    • 1
  • a

    araqnid

    05/14/2018, 5:53 PM
    for that specifically,
    val root = js { message = { "Hello World!!" } }
    ? (import kotlinext.js.js)
    r
    m
    • 3
    • 19
  • l

    Lucas

    05/15/2018, 11:51 AM
    Does the GitHub repository
    Kotlin/js-externals
    accepts any kind of definitions or just big frameworks and libraries? Is it the official Definitely Typed for Kotlin?
    r
    • 2
    • 3
  • c

    chadmorrow

    05/16/2018, 11:36 PM
    I had this working months ago but now I can't figure out how I did it for the life of me. I want to make a post request to a server i'm running on localhost using the fetch api. I can run Get requests with no troubles but the POST requests always fail, regardless of browser. I get a
    TypeError: Failed to execute 'fetch' on 'Window': Invalid referrer policy
    error every time. The server is set to allow cors for "*". My request looks like this:
    val requestOpts = RequestInit().apply {
        method = "POST"
        body = JSON.stringify(postData)
    }
    
    window.fetch("<http://localhost:7000>", requestOpts).then { console.log("Post success!" }.catch { console.log("Whomp whooooomp") }
    s
    b
    • 3
    • 8
  • k

    kotlin_questions

    05/17/2018, 5:55 AM
    How big is the output size?
    n
    k
    • 3
    • 3
  • b

    bissell

    05/20/2018, 8:17 PM
    My guess is I need some tweak to my build setup. I couldn't find a related bug in YouTrack
    g
    • 2
    • 2
  • k

    Krizzu

    05/24/2018, 7:58 AM
    Hey, anyone knows why my gradle does not rebuilds my kotlin files? I’ve set the project according to instructions, got console output, but once I add some stuff, nothing changes.
    b
    • 2
    • 3
  • e

    Evgeniy Zaharov

    05/26/2018, 5:29 PM
    mb is’s possible to compile kotlin/js module to two separated js modules?
    • 1
    • 1
  • i

    Icaro Temponi

    05/27/2018, 2:17 PM
    Hi everyone. I'm using Kotlin do develop android apps and I'm deeply in love with it, wanting to use the language everywhere. After searching a little, I discovered that it's possible to use react with kotlin. What I want to know is how steep the learning curve would be for me, considering I already know Angular at the front-end (both JS and Angular6), which could help me. So, is it difficult to learn? Or should I begin with the pure KotlinJS?
    c
    • 2
    • 3
  • p

    pike

    05/28/2018, 6:32 AM
    I'm trying to get a simple kotlin js web app up and running but I'm failing everywhere. is there a clear example to get started?
    c
    • 2
    • 1
  • v

    Vivek

    05/28/2018, 4:47 PM
    Someone answered that question on SO and said I should consume the API as
    dynamic
    and the use dynamic-to-kotlin converter in
    kotlinx.serialization
    I would have liked a way to maintain type safety for this operation. Not a fan of using
    dynamic
    . Hopefully we will get there sometime soon!
    g
    • 2
    • 1
  • p

    pike

    05/29/2018, 12:57 AM
    how caan I add coroutines to a js project?
    g
    • 2
    • 2
  • p

    pike

    05/30/2018, 1:06 AM
    I keep getting this error : Uncaught TypeError: e.defineModule is not a function
    x
    g
    a
    • 4
    • 3
Powered by Linen
Title
p

pike

05/30/2018, 1:06 AM
I keep getting this error : Uncaught TypeError: e.defineModule is not a function
x

Xiaozhou JIA

05/30/2018, 11:57 AM
I was wondering when do you get this message? I had to deal with that as well and I found they are saying it’s something related
node_modules/.cache
https://github.com/JetBrains/create-react-kotlin-app#user-content-npm-start-or-yarn-start
g

gbaldeck

05/30/2018, 7:55 PM
Delete node_module/.cache and clear the app's browser cache
a

anton.bannykh

05/31/2018, 4:43 PM
That could be happening if you use DCE'd kotlin.js with non-DCE'd kolin modules somehow. At least that's the cause in some cases.
View count: 2