Join Slack
Powered by
Hi! I want to write extension for firefox with kot...
# announcements
j
Jarek
02/21/2018, 10:04 AM
Hi! I want to write extension for firefox with kotlinjs and java. I try to open file and rename file name using
java.io.File.Is
it possible?
d
diesieben07
02/21/2018, 10:08 AM
You can't use Java libraries when compiling to Javascript.
a
anton.bannykh
02/21/2018, 10:08 AM
You won't be able to use java.io.File in Kotlin/JS. You will have to use proper JavaScript API:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Working_with_files
anton.bannykh
02/21/2018, 10:09 AM
But you are able to use java.io.File in Kotlin/JVM. You've mentioned you are going to use Java. If you are going to use it on JVM - no problem, go ahead.
j
Jarek
02/21/2018, 10:29 AM
ok thanks
g
gildor
02/21/2018, 10:42 AM
little bit off-topic, but probably these posts from
@kirillrakhman
would be interesting for you:
https://medium.com/@Cypressious/your-first-firefox-web-extension-in-kotlin-348fc907915
https://medium.com/@Cypressious/your-second-firefox-extension-in-kotlin-bafd91d87c41
👍 2
Open in Slack
Previous
Next