|
Class: JavaScriptEnvironment
Object
|
+--JavaScriptEnvironment
- Package:
- stx:libjavascript
- Category:
- Languages-JavaScript-Framework
- Version:
- rev:
1.48
date: 2017/10/22 18:44:31
- user: cg
- file: JavaScriptEnvironment.st directory: libjavascript
- module: stx stc-classLibrary: libjavascript
queries
-
scriptingNamespace
-
return a namespace, in which the scripts global variables
are searched. Returning myself here, will make Math and Date
visible (maybe more in the future)
accessing
-
__theReceiver
-
keep this for backward compatibility
-
_argVariables
-
-
_beHTMLEnvironment
-
-
_defineFunction: aFunction as: selector
-
_functions isNil ifTrue:[
-
_defineVariable: name value: initialValue
-
-
_functions
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
_functions: aDictionary
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
_isHTMLEnvironment
-
-
_localVariables
-
-
_localVariables: aDictionary
-
-
_outStream
-
-
_outStream: aStream
-
-
_outerEnvironment
-
-
_outerEnvironment: anEnvironment
-
-
_theReceiver
-
keep this for backward compatibility
-
_theReceiver: anObject
-
-
_topEnvironment
-
-
isReturnedFrom: something
-
isReturnedFrom := something.
-
receiver
-
builtin functions
-
alert: msg
-
-
confirm: msg
-
(comment from inherited method)
open a modal yes-no dialog.
Return true for yes, false for no.
If no GUI is present (headless applications), true is returned.
Someone in the sender chain may redefine the confirmation handler
by handling the UserConfirmation.
-
js_alert: msg
-
-
js_confirm: msg
-
-
print: msg
-
-
println
-
-
println: msg
-
error handling
-
doesNotUnderstand: aMessage
-
(comment from inherited method)
this message is sent by the runtime system (VM) when
a message is not understood by some object (i.e. there
is no method for that selector). The original message has
been packed into aMessage (i.e. the receiver, selector and
any arguments) and the original receiver is then sent the
#doesNotUnderstand: message.
Here, we raise another signal which usually enters the debugger.
You can of course redefine #doesNotUnderstand: in your classes
to implement message delegation,
or handle the MessageNotUnderstood exception gracefully.
expression evaluation
-
_evaluateAction: aString with: aComponentName
-
invoked when some HTML-element (such as a button) with an ONCLICK
action is pressed. This is supposed to parse the passed string as
an expression in my language (i.e. javaScript) and invoke that
function.
-
_readEvalFrom: inputStream to: outputStream errorTo: errorStream
-
-
_readEvalFrom: inputStream to: outputStream errorTo: errorStream print: doPrint
-
self warn:'error in script: ' , ex description
-
_readEvalPrintFrom: inputStream to: outputStream errorTo: errorStream
-
-
exitWith: val
-
html-browser interaction
-
_start
-
cannot do:
usage example(s):
self perform:#js_start ifNotUnderstood:[].
|
-
_stop
-
cannot do:
usage example(s):
self perform:#js_stop ifNotUnderstood:[].
|
queries
-
_isFunctionEnvironment
-
-
isInnerFunction
-
-
isInnerJavaScriptBlock
-
-
isJavaScriptClassNode
-
setup
-
_setupForWindow: aWindow
-
painter notNil ifTrue:[
AppletObject
AppletsObject
Array
Date
Document
DocumentObject
FormFieldObject
FormObject
FormsObject
HistoryObject
Math
String
WindowObject
|