https://kotlinlang.org logo
Docs
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
  • c

    cy

    04/26/2017, 9:04 AM
    @Tristan Caron hi, any details? is there package.json generated in build dir?
    t
    2 replies · 2 participants
  • e

    Eugenio

    04/26/2017, 4:39 PM
    is there a gradle option/task/script to extract it from the bundled compiler?
    k
    13 replies · 2 participants
  • a

    adeln

    04/26/2017, 5:05 PM
    @Eugenio you can also try creating a folder with a simple
    package.json
    , and then
    npm install kotlin
    in it
    e
    2 replies · 2 participants
  • t

    Tristan Caron

    04/27/2017, 10:25 AM
    @cy ^^
    c
    1 reply · 2 participants
  • g

    gbaldeck

    04/27/2017, 12:36 PM
    what are those
    replaceVersion(...)
    lines doing?
    c
    1 reply · 2 participants
  • t

    Tristan Caron

    05/04/2017, 8:45 AM
    Just wondering, is something similar to https://prepack.io/ planed? Removing dead code and computing stuff earlier seems to be a good idea. Even when targeting JVM, thought.
    k
    3 replies · 2 participants
  • y

    yole

    05/06/2017, 6:13 AM
    this is not supported yet, please wait for announcements
    👍 4
    s
    2 replies · 2 participants
  • e

    Eugenio

    05/09/2017, 1:12 PM
    Is there a way to avoid having to call the companion object to invoke functions on it, sort of like the equivalent of
    @JvmStatic
    ?
    b
    5 replies · 2 participants
  • e

    Eugenio

    05/09/2017, 7:55 PM
    @yogurtearl no state, but we want to keep an existing API where the functions are called like
    SomeClass.somemethod()
    s
    11 replies · 2 participants
  • g

    gaetan

    05/11/2017, 3:57 PM
    Even, if it was y,x in java the javascript version of Math.kt exposes the Javascript Math object. So it should respect the Javascript api. The problem is that the first param is really the y param but named x.
    r
    5 replies · 2 participants
  • l

    louiscad

    05/16/2017, 12:38 PM
    Hi, anyone is using the Firebase Realtime database here? I'd like to know if Cloud Functions which currently support js only could work with kt2js, and I'm looking forward a sample if possible, event a really simple one.
    s
    4 replies · 2 participants
  • m

    maciekjanusz

    05/18/2017, 11:11 AM
    hello, I'm building a kotlin javascript project with gradle. what is the best way to automate copying
    kotlin.js
    and
    kotlin.meta.js
    files to output dir? It works great with Idea project but I don't know how to do it nicely with gradle
    b
    3 replies · 2 participants
  • p

    patrickdelconte

    05/23/2017, 11:40 AM
    I'm trying to get the kotlin fullstack example to run (cloned it from github). when I run gradlew build the task ':frontend:webpack-bundle' fails with "cannot find module '.../frontend/build/node_modules/webpack/bin/webpack.js'" obvioulsy it fails because the webpack module is not located at that path. Do I need to add something to the build.gradle or am I missing something else?
    b
    c
    28 replies · 3 participants
  • c

    cy

    05/27/2017, 6:16 AM
    you can do the same for js, just build another artifact jarp
    s
    3 replies · 2 participants
  • t

    turansky

    05/30/2017, 10:41 PM
    How I can describe static methods for JS classes?
    b
    7 replies · 2 participants
  • v

    visruth

    05/31/2017, 7:44 AM
    Is there any Java library to convert Kotlin to JavaScript code? I have a String s = "contains Kotlin code"; which I want to convert to a JavaScript code? is it possible?
    u
    b
    7 replies · 3 participants
  • h

    hughg

    06/02/2017, 12:11 PM
    I'm toying with a client-only JS one-page app -- persistence via PouchDB, so no server needed. I've been looking at Yested (https://github.com/jean79/yested) to make the GUI bits easier, although it doesn't have any MVC. Anything else I should investigate?
    k
    6 replies · 2 participants
  • f

    fitzoh

    06/09/2017, 2:41 PM
    Anyone have a guide on setting up junit tests (or equivalent for js files/projects?
    a
    g
    +1
    26 replies · 4 participants
  • g

    gaetan

    06/09/2017, 4:57 PM
    Performances of kotlin.js are pretty cool: http://data2viz.io/dist/voronoiSphere.html
    :kotlin: 1
    💎 1
    👍 2
    a
    n
    11 replies · 3 participants
  • i

    ice32

    06/09/2017, 5:15 PM
    Are there any documented performance benefits of using Kotlin js compared to just JS? I guess there isn't much performance improvement, if any, since the javascript engines are doing most of the performance optimizations anyway?
    b
    1 reply · 2 participants
  • l

    liz3

    06/10/2017, 9:50 PM
    Hey, i saw that jQuery will be removed from the standard libary, is or will there be another way to easily access jquery elements?
    k
    1 reply · 2 participants
  • l

    liz3

    06/10/2017, 10:13 PM
    the solution was simple:
    fun jQueryObj(name:dynamic) = js("$(name)")
    k
    2 replies · 2 participants
  • h

    hiperbou

    06/12/2017, 4:30 PM
    I'm trying to enable coroutines in javascript, although I've been succesful with a Gradle project. it seems that the instructions for a IntelliJ project are not working (https://kotlinlang.org/docs/diagnostics/experimental-coroutines.html), and I'm unable to do it. Neither the quick-fix method or changing the compiler options works for me (The menu path for this, seems also wrong). I'm using the latest IntelliJ IDEA Community and the latest stable Kotlin Plugin.
    a
    2 replies · 2 participants
  • d

    dawitt

    06/13/2017, 2:46 PM
    Hi! Has anyone here tried to use react-router-dom inside the Kotlin fullstack example? I added the npm dependency and was able to include it via
    runtime.wrappers.require("react-router-dom")
    but I think I'm missing the types so that Kotlin can properly instantiate the components (currently I'm using
    js("""new Router()""")
    . I've tried to use ts2kt on index.d.ts from the definitely typed repo (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-dom), but it notifies me that ImportDeclaration are unsupported. Any ideas how to get this working?
    b
    d
    5 replies · 3 participants
  • n

    nish

    06/15/2017, 3:35 AM
    Anyone know how to make KotlinJS export a default module?
    k
    1 reply · 2 participants
  • k

    klensi

    06/16/2017, 11:28 AM
    is there any front-side web framework for Kotlin? Else, which framework do you recommend?
    l
    b
    4 replies · 3 participants
  • g

    gbaldeck

    06/17/2017, 11:21 AM
    does anyone know how to specify the webpack version in the kotlin front-end plugin?
    b
    c
    5 replies · 3 participants
  • n

    nish

    06/19/2017, 2:58 PM
    @gaetan what does your buildscript look like?
    g
    b
    9 replies · 3 participants
  • d

    Dalinar

    06/20/2017, 5:59 AM
    I'm not really familiar with javascript currently, I can program in it - I just haven't for a long time so forget how some things work. If I made a javscript library in Kotlin, would I be able to load it from a local file location? Or does it have to be placed on a server? I'm making a Firefox Addon if that matters, possibly at some future time might migrate it to chrome. So therefore this question is specifically about javscript being run in an addon or extension, not on a page. Addon/extension is for personal use, it won't be "in a store"
    k
    1 reply · 2 participants
  • d

    Dalinar

    06/20/2017, 6:09 AM
    Q2. can JDBC be used with Kotlin Javascript? Q3. are kotlin javascript libraries able to access the local file system?
    k
    n
    4 replies · 3 participants
Powered by Linen
Title
d

Dalinar

06/20/2017, 6:09 AM
Q2. can JDBC be used with Kotlin Javascript? Q3. are kotlin javascript libraries able to access the local file system?
k

konsoletyper

06/20/2017, 7:04 AM
mishaxz: 1) no, but you can try to use IndexedDB (you have to write typed headers) or any wrapper around it
2) of course not, since in JavaScript you can't access local filesystem. But if you are writing Firefox addon, all depends on what APIs exposed by Firefox
d

Dalinar

06/20/2017, 7:11 AM
ok thanks i have a better understanding now
n

napperley

06/25/2017, 12:35 AM
Can only use JDBC on the server-side via the JVM using Kotlin for example. Can use Fetch API or AJAX to have the client communicate with the server and vice versa.
View count: 1