javascript
Overview of Haxe code snippets, examples and tutorials tagged with javascript.
May 23, 2016 Compilation / Compiling libraries without main class
In most cases, you want a Main class with a static main function as entry point to start your program. However, there are cases where there is no need for this - for example if you are writing a library that other programs will be using. ‥
Oct 11, 2016 Other / VGA text renderer
This entry came to be after Haxe user anniz shared his experiment which aimed to recreate VGA text rendering in Flash. Soon after, it was proposed and discussed as a potential Code Cookbook entry. You can read more about its history in this repository issue.‥
Feb 27, 2017 JavaScript / Adding a HTML element to the DOM
This is an example to add a paragraph element to the HTML page when the DOM is ready. This tutorial contains two methodes; with and without jQuery.‥
May 24, 2016 JavaScript / Using Haxe classes in JavaScript
Normally, when compiling Haxe to JavaScript, the resulting code is kept away from the global scope. This means that you can't reach the Haxe generated code from other scripts. To make that possible, there's the @:expose metadata that can be used on a class. This makes the class exposed to the global scope, and therefore possible to use in plain JavaScript.‥
Nov 21, 2017 JavaScript / JavaScript inline web workers in Haxe
JavaScript workers make it possible to perform costly calculations (media decoding etc, crypt calculations etc.) in a background thread, without blocking the main UI. There are lots of articles about workers on the net:‥
Feb 28, 2017 JavaScript / Create a server with Haxe/NodeJS
The following tutorial creates a http server using Haxe/Node.js at port 8000 and demonstrates how to build and run it.‥