bashor
July 30, 2014, 1:25pm
2
Hi, Robert.
Unfortunately right now we don’t have documentations for that, but You can see code here https://github.com/JetBrains/kotlin/tree/master/js/js.libraries/src
And I collected some useful links, I hope this will help you:
http://blog.jetbrains.com/kotlin/2013/10/writing-kotlin-in-the-browser/
Hi,
In the blog post about using Kotlin with javascript there is a hint that it should be possible to call javascript from kotlin generated javascript. Could someone give me a hint on how to do that?
I have the following working:
fun callJavascript() {
var script = window.document.createElement(“script”);
script.textContent = “callJavascriptTest();”
window.document.body.appendChild(script);
}
But this means a script node will be created for every call, wich can lead to a lot of nod…
Hello all!
I’m newbie in Idea and Kotlin. I want to start Kotlin to JavaScript development, but i dont understand how configure my project for this purpose?
I have an Idea 13.1.1 and Kotlin plugin. I created Kotlin(JavaScript) project. In the src folder i created folder “web” and index.html file in this web folder. In the Run configuration i choose this folder for “Generated JavaScript file directory” and also set my index.html file.
But i can’t run my “Hello World” project, run button is dis…
The class JQuery contain some useful functions from this library, but very small set of them. Is where a way to add other jquery functions in to JQuery class by using extension functions or something over way?
The code below do not work:
//Uncaught ReferenceError: noImpl is not defined:
/*fun JQuery.hide(): JQuery {js.noImpl;
return this;
}*/
//event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
fun JQuery.hide() : JQuery = this
upd: …
I had gave Kotlin a spin a while back, and recently wanted to revisit it. I installed the Kotlin plugin in IntelliJ 13 and restarted, but aside from a few things in Preferences, I don't see Kotlin elsewhere. When I create a new project, I don't see a "Kotlin" option. I can create a new Kotlin file in an existing project, but I'm not sure what to do with it/I don't get prompted on how I'd like to compile it. When I go to Project Structure, I don't see a way to create a Kotlin module or anythi…
This is some javascript code, which is a directive in angularjs:
todomvc.directive('todoFocus', function todoFocus($timeout) {
return function (scope, elem, attrs) {
scope.$watch(attrs.todoFocus, function (newVal) {
if (newVal) {
$timeout(function () {
elem[0].focus();
}, 0, false);
}
});
};
});
And following is my Kotlin code:
val xxx = {(timeout: Timeout) ->
{(scope: BaseScope, elem: Elem…
We work on new API reference for both backends and big part of current stdlib will be available in the future for JS backend too.
2. I don't know about any project where Kotlin used in both side.
In IDEA you can create two unrelated projects and set up a module in each of these using the same source directory, but different targets.
Additionally You can try do it by ant or maven build by sharing source dirs between different ant/maven projects.
Anyway feel free to ask any question here or directly me(zalim.bashorov@jetbrains.com ).