Prev | Current Page 728 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

The other two classes are from the
js package; the first is to initialize the JavaScript environment and should not be used directly from
the developer. The second provides some useful features frequently used. Table 14 - 2 describes the
methods and variables of the js. Lib class.
??‘
??‘
??‘
??‘
Table 14-2
js.Lib Static Field Description
function alert(v:Dynamic) : Void Calls the alert() JavaScript function.
function eval(code:String) :
Dynamic
Evaluates and processes the code passed as an
argument. Note that the code must be JavaScript code
and not haXe code.
function setErrorHandler
(f:String-> Array->Bool) :
Void
Allows redirecting the errors to a custom function.
The custom function must have as arguments a text
message and an array containing the messages from
the execution stack and must return a Boolean value.
If the function returns true, the error is ignored;
otherwise the execution is interrupted.
var document : Document Is a reference to the Document object in a DOM tree.


Pages:
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740