HaxeFoundation/haxe — pull request #3564 by gloomybrain (2014-11-11 13:53:34+00:00)
Title: [js] Fix exposing for integrated runtimes

Integrated JavaScript runtimes oftent don't (and probably don't need to) have such things like "window", "exports", "console" etc. So this fix is intented to use "this" object whenever other options are not available. "this" will always be defined and will refer to the parent scope, since we use a self calling function here to expose haxe classes.