package js
Available on jsPlatform-specific JavaScript Library. Provides some platform-specific functions for the JavaScript target.
static read only global:Dynamic
An alias of the JS "global" object.
Concretely, it is set as the first defined value in the list of window
, global
, self
, and this
in the top-level of the compiled output.
static read only nativeThis:Dynamic
nativeThis
is the JavaScript this
, which is semantically different from the Haxe this
. Use nativeThis
only when working with external JavaScript code.
In Haxe, this
is always bound to a class instance. In JavaScript, this
in a function can be bound to an arbitrary variable when the function is called using func.call(thisObj, ...)
or func.apply(thisObj, [...])
.
Read more at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this
static read only undefined:Dynamic
Returns JavaScript undefined
value.
Note that this is only needed in very rare cases when working with external JavaScript code.
In Haxe, null
is used to represent the absence of a value.
static alert (v:Dynamic):Void
Display an alert message box containing the given message.
static inline debug ():Void
Inserts a 'debugger' statement that will make a breakpoint if a debugger is available.
static inline eval (code:String):Dynamic
static inline require (module:String):Dynamic
Inserts a require
expression that loads JavaScript object from a module or file specified in the module
argument.
This is only supported in environments where require
function is available, such as Node.js or RequireJS.
static inline rethrow ():Void
Re-throw last cathed exception, preserving original stack information.
Calling this only makes sense inside a catch statement.
© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/Lib.html